Ifelse syntax issue

Started by Bannana, January 18, 2015, 01:05:01 AM

Previous topic - Next topic

Bannana

The animation I need to access is dependent of whether the enemy is KO'd or not. However, Ifelse is only returning no, even if the enemy is alive.
anim = ifelse((target,alive = 1),6103,0)

I don't want to believe the system is reading the comma between target and alive as separating two expressions, but aside from that I can't see any reasons for the issue.

Demented Fortune Cookie

Target will only work when your opponent is in a hit state. Use enemy,alive instead.

Or something like that...

Bannana

Enemy gets me the same result as well.

Demented Fortune Cookie

Okay, that's not quite right. Are you sure your character actually goes into that state, and if so, any debug flood ?

DivineWolf

Perhaps a RoundState, MatchOver, or WinKO trigger could work...?

Bannana

Re-checked my states and the debug and I found that I had another sctrl that had target still, which, for one reason or another, caused issues with the ifelse. Thanks for the suggestions guys.