Weird problem with cmd. *Solved*

Started by Devsman, July 23, 2010, 06:59:47 PM

Previous topic - Next topic

Devsman

For whatever reason, this state -1 controller doesn't seem to ever be activated.

[State -1]
type = varset
var(1) = life
var(2) = p2life
var(3) = 300
triggerall = !var(59)
triggerall = ctrl
triggerall = power = 3000
trigger1 = command = "hyper1"
trigger2 = command = "c"
trigger3 = command = "z"

I can tell because this helper never appears, and my other assertspecial controllers based on the variable var(3) don't take effect either.

[State -1]
type = helper
trigger1 = var(3) = 299
trigger1 = !numhelper(4000)
stateno = 4000
ownpal = 1
ID = 4000

var(3) should achieve the value of 299 thanks to a state -2 controller I have:

[State -2]
type = varadd
trigger1 = var(3) != 0
value = -1

For the life of me I can't figure out what's wrong with it.  :(  Any help will be appreciated.

Syokool

I think that te state controller -2 is in statedef -1, -2 o -3:

[State -2]
type = varadd
trigger1 = var(3) != 0
value = -1
Then varadd is substracting -1 each tick that var 3 isn't zero. If this state is in other statedef try to change the varset controller like this:

[State -1]
type = varset
var(1) = life
triggerall = !var(59)
triggerall = ctrl
triggerall = power = 3000
trigger1 = command = "hyper1"
trigger2 = command = "c"
trigger3 = command = "z"

[State -1]
type = varset
var(2) = p2life
triggerall = !var(59)
triggerall = ctrl
triggerall = power = 3000
trigger1 = command = "hyper1"
trigger2 = command = "c"
trigger3 = command = "z"

[State -1]
type = varset
var(3) = 300
triggerall = !var(59)
triggerall = ctrl
triggerall = power = 3000
trigger1 = command = "hyper1"
trigger2 = command = "c"
trigger3 = command = "z"

Other solution is using the debug option to show the var(3) amount and verify if varadd and varset are working.

Devsman

#2
I tried what you've got, but it didn't help any.  How do you work with the debug menu anyway?  It cuts off most of my variables at the bottom of the window...

Okay, I think I figured it out now.  I feel like an idiot lol.  I forgot the commands "c" and "z" only activate when you press them and not if they're being held.  Yes, you were right about needing three varset controllers.  Thanks!