YesNoOk
avatar

State machine stuck in loop (Mugen 1.0) (Read 2244 times)

Started by evilmind5, September 03, 2017, 07:00:13 am
Share this topic:
State machine stuck in loop (Mugen 1.0)
#1  September 03, 2017, 07:00:13 am
  • avatar
    • USA
Hello everyone, I need help fixing this issue. Is there something I need to remove or add? It said 9000, so I added the statedef 9000 cns code only. I'm new to this and not sure what else to add

*State machine stuck in loop (stopped after 2500 loops): 9000 for Hulk Check your states for infinite ChangeState loops.*

;===============================================================================================
;Super Armor State
[Statedef 9000]
MoveType = H?

[State 9000, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1

;[State 9000, NotHitBy]
;type = NotHitBy
;trigger1 = 1
;value = SCA, AA, NP, SP
;time = 1

[State 9000]
type = PalFX
trigger1 = Alive
trigger1 = !Time
trigger2 = Time = 1
time = 20
add  = -100,-100,-100                               
sinadd = 14,113,195, 3                             
color = 0                                               
;invertall = 1

[State 9000, LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = - floor(gethitvar(damage) / 2)

;[State 9000, ChangeAnim]
;type = ChangeAnim
;trigger1 = Time < floor(gethitvar(hittime) * 0.8)
;value = Anim
;elem? = AnimElemNo(0)

;[State 9000, ChangeState]
;type = ChangeState
;trigger1 = Life <= 0
;value = ifelse(StateType = A, 5020,5000)

;[State 9000, End]
;type = ChangeState
;trigger1 = Time >= floor(gethitvar(hittime) * 0.8)
;value = Var(0)

[State 9000, b]
type = VarSet
trigger1 = time <= 0
v = 36
value = AnimElemNo(0)
ignorehitpause = 1

[State 9000, 1]
type = VarSet
trigger1 = time = 0
v = 37
value = var(33)

[State 9000, 2]
type = Null ;VarSet
trigger1 = time = 0
v = 33
value = 0

[State 9000, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1

[State 9000, VarSet]
type = VarSet
trigger1 = Life <= 0
v = 38
value = 1

[State 9000, ChangeState];Dead
type = ChangeState
trigger1 = Life <= 0
value = ifelse(StateType = A, 5020,5000)

[State 9000, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = Anim
elem = var(36)

[State 9000, End]
type = ChangeState
trigger1 = (time >= floor(gethitvar(hittime) * 0.8)) && (Life > 0)
value = var(34)
ctrl = var(35)

;===============================================================================================
;Super Armor State
[Statedef 9013]
MoveType = H?

[State 9000, PosFreeze]
type = PosFreeze
trigger1 = 1
value = 1

;[State 9000, NotHitBy]
;type = NotHitBy
;trigger1 = 1
;value = SCA, AA, NP, SP
;time = 1

[State 9000]
type = PalFX
trigger1 = Alive
trigger1 = !Time
trigger2 = Time = 1
time = 20
add  = -100,-100,-100                               
sinadd = 14,113,195, 3                             
color = 0                                               
;invertall = 1

[State 9000, LifeAdd]
type = LifeAdd
trigger1 = Time = 0
value = - floor(gethitvar(damage) / 2)

[State 9000, ChangeAnim]
type = ChangeAnim
trigger1 = Time < floor(gethitvar(hittime) * 0.8)
value = Anim
elem? = AnimElemNo(0)

[State 9000, ChangeState]
type = ChangeState
trigger1 = Life <= 0
value = ifelse(StateType = A, 5020,5000)

[State 9000, End]
type = ChangeState
trigger1 = Time >= floor(gethitvar(hittime) * 0.8)
value = Var(22)
d(:^D)-/--<
Re: State machine stuck in loop (Mugen 1.0)
#2  September 04, 2017, 11:14:50 am
  • avatar
  • ***
  • ̢̻̮̫̬̹̞̼̲̪̜̭͇̲͒ͪ̌ͬ̒̄̔̐͘͟ͅ ̢̋ͬ̓͗̏̇̌̑͐ͤ͗̔̊̕͏̴̣͎̟͈̬͚
    • Monaco
that basically changestate value must not same as statedef number
if you want loop u need to change to other state first. then return to previous state to loop it. it requires 2 statedef to loop without these error


you need to change var(34) because sometimes it will become 9000 , make sure var(34)value were never 9000
[State 9000, End]
type = ChangeState
trigger1 = (time >= floor(gethitvar(hittime) * 0.8)) && (Life > 0)
value = var(34)
ctrl = var(35)

or make
another statedef with almost same code with statedef 9000
and loop thru it



http://signavatar.com/32255_s.gif

please visit my request thread. here
bad grammar is art
Last Edit: September 04, 2017, 11:30:04 am by yaminogun