State Machine Stuck in Loop

Started by oraora?, January 02, 2011, 05:50:10 AM

Previous topic - Next topic

oraora?

Hi, does anyone know how to fix this error message:

Error Message: State machine stuck in loop (stopped after 2500 loops): 7201 for
Orochi Iori
Check your states for infinite ChangeState loops.

I guess there is a problem in this state since that is the only 7201 state that I can find in his files:

[Statedef 7200]
type = A
ctrl = 0
anim = 7200
velset = 0,0
movetype = I
physics = N
sprpriority = 7

[state a]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible
;---------------------[移動関係]
[state a]
type = posset
trigger1 = 1
x = 0
y = 0

;---------------------[透過]
;---------------------[]
[state a]
type = changestate
trigger1 = root,var(8) = 1
trigger1 = root,movehit = 1
value = 7201

;----------------------------------------------------------------------------
;(HELPER)カウンター
[Statedef 7201]
type = A
ctrl = 0
anim = 7200
velset = 0,0
movetype = I
physics = N
sprpriority = 7

[state a]
type = AssertSpecial
trigger1 = 1
flag = noshadow
flag2 = invisible

;---------------------[移動関係]
[state a]
type = posset
trigger1 = 1
x = 0
y = 0

[State a]
type = EnvColor
trigger1 = time = 0
persistent = 0
ignorehitpause = 1
time = 2
value = 255,255,255
under = 2

;---------------------[エフェクト]
[State explod];
type = Explod
trigger1 = time = 0
trigger1 = facing = 1
anim = 7205
id = 7200
sprpriority = 5
postype = left
pos = -39,90
bindtime = -1
supermove = 0
under = 0
ownpal = 1

[State explod];
type = Explod
trigger1 = time = 0
trigger1 = facing = -1
anim = 7206
id = 7200
sprpriority = 5
postype = right
pos = 39,90
bindtime = -1
supermove = 0
under = 0
ownpal = 1

;---------------------[]
[state a]
type = changestate
trigger1 = enemy,movetype = I
value = 7200


and also his .cns

[state a];
type = Helper
trigger1 = numhelper(7200) = 0
id = 7200
name = "g"
sprpriority = 1
pos = 0,0
postype = p1
stateno = 7200
helpertype = normal
pausemovetime = 999999
keyctrl = 1
ownpal = 1


I believe that is his counter code which when his opponent attack him and he counter the opponent attack, the word counter will appear just like in any other fighting game, in team simul and fighting against armour characters such as abyss, last boss of marvel vs capcom 2 or armour gaoh, last boss of samurai shodown 5, the counter word keep on appearing and it cause to crash as well as his recent Heavy D' too.

My real life is coming soon........!

Crucifix

It is because you have statedef 7201 changing to 7200 and then back to 7201.  Once in 7201 it changes back to 7200, and then back to 7201.  Once in 7201 it changes back to 7200, and then back to 7201.  Once in 7201 it changes back to 7200, and then back to 7201.  Once in 7201 it changes back to 7200, and then back to 7201.  Once in 7201 it changes back to 7200, and then back to 7201.  Once in 7201 it changes back to 7200, and then back to 7201.  Once in 7201 it changes back to 7200, and then back to 7201. 

That's your problem.  It keeps looping between 7200 and 7201.  Change one of the changestates and it should work fine.  Or, just delete both states.


Crucifix WIP: 20%
Final Hollow Ichigo WIP: 10%
Tomoyo Sakagami WIP: 65%
Youtube: http://www.youtube.com/user/RavenousCrucifix
Deviantart: http://ravenouscrucifix.deviantart.com/

Ƹ̵̡Ӝ̵̨̄ƷShadyƸ̵̡Ӝ̵̨̄Ʒ

Quote;---------------------[]
[state a]
type = changestate
trigger1 = enemy,movetype = I
value = 7200

You probably need destroyself instead changestate.

もう何も無いのねAlexandria Shady Rensia。少しこの名前に疲れているのかしら。自分を嫌いになりそう。

2OS

#3
The following lines of code is basically the same code you posted above, but, in a MUCH more simplified manner, delete the old codes, and use this


[Statedef 7200]
type=a
movetype=i
physics=n
anim=7200
ctrl=0
velset=0,0

[State 2OS]
type=assertspecial
trigger1=1
flag=invisible
flag2=noshadow
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999

[State 2OS]
type=envcolor
trigger1=root,var(8)=1&&root,movehit=1
time=2
value=255,255,255
under=2
ignorehitpause=1
persistent=1

[State 2OS]
type=explod
trigger1=!numexplod(7200)&&root,var(8)=1&&root,movehit=1
anim=7205+1*(facing=-1)
id=7200
sprpriority=5
postype=ifelse(facing=1,left,right)
pos=-39+78*(facing=-1),90
bindtime=-1
ownpal=1
ignorehitpause=1
persistent=1

[State 2OS]
type=posset
trigger1=1
x=0
y=0
ignorehitpause=1
persistent=1




[State 2OS]
type=helper
trigger1=!numhelper(7200)
id=7200
name="counter"
stateno=7200
ignorehitpause=1
persistent=1
pausemovetime=9999999
supermovetime=9999999


I simplified it to only use one state, rendering the error you keep encountering COMPLETELY impossible