Unusual variable sequence!

Started by Fighting Toys Freak, March 16, 2012, 09:56:03 PM

Previous topic - Next topic

Fighting Toys Freak


;Wall Stand
[Statedef 501]
type = S
movetype = A
physics = S
anim = 13
ctrl = 0
velset = 0,0

[State 501, 1]
type = VarSet
triggerall = stateno = 501
trigger1=(time=0)
var(0)=1
persistent=0

[State 501, 2]
type = VarSet
triggerall = (stateno !=501)
trigger1 = (stateno = 45) || (movetype = H)
var(0)=0
persistent = 0

[State 501, 3]
type = BindToRoot
trigger1 = 1
time = 1
pos = backedgedist,backedgedist

[State 501, 4]
type = ScreenBound
trigger1 = time=[0,1]
value = 1
ignorehitpause = 1

[State 501, end]
type = ChangeState
trigger1 = command = "fwd_c"
value = 702

[State 501, end2]
type = ChangeState
trigger1 = command = "Shadow Possesen" && power>=2000
value = 707

[State 501, end3]
type = ChangeState
trigger1 = command = "FF"
value = 45
;-------------------------------------------------------------------------------

According to the problem of this code, it seems that the var(0) is set to 1 when I actually pressing the command "FF" outside of the state number. When inside of the state number when the command is pressed at the first time, the variable doesn't set to 1. I checked other state numbers and non triggered it. Is there any faulty in this state definition?

Cobra Caddie

State controllers are bound to the state that they are created in. You have this:

trigger1 = (stateno = 45) || (movetype = H)

Inside of state 501. :-\ Hell you have this:

triggerall = (stateno !=501)

INSIDE OF STATE 501. I'm trying my best not to be rude about this but you've been programming and asking for help in this section for years now and this is something you should know by now.

Fighting Toys Freak

Quote from: Caddie on March 16, 2012, 10:01:21 PM
State controllers are bound to the state that they are created in. You have this:

trigger1 = (stateno = 45) || (movetype = H)

Inside of state 501. :-\ Hell you have this:

triggerall = (stateno !=501)

INSIDE OF STATE 501. I'm trying my best not to be rude about this but you've been programming and asking for help in this section for years now and this is something you should know by now.


[State 501, 1]
type = VarSet
trigger1 = (time=0)
var(0)=1

[State 501, 2]
type = VarSet
triggerall = (var(0)=1)
trigger1 = (stateno = 45)
var(0)=0

I tried that but it doesn't work! Is there another suggestion?  :-\

Seravy

trigger1 = (stateno = 45)
This is going to never trigger as long as it is placed in state 501 because 501 is never equal to 45. So your variable will never set to 0 by it, so it remains 1.

If you want the state to be 45, you need it in statedef 45 or in the minus states.

XGargoyle

but, dude, the effect was working in another character!! I just copied it and it's not working on mine, why? ;D


XGargoyle: Battle posing since 1979
http://xgargoyle.mgbr.net
http://www.pandorabots.com/pandora/talk?botid=e71c0d43fe35093a  <-- Please click that link
http://paypal.me/XGargoyle  <-- Donations welcome!