YesNoOk
avatar

Ifelse syntax issue (Read 748 times)

Started by Bannana, January 18, 2015, 01:05:01 am
Share this topic:
Ifelse syntax issue
#1  January 18, 2015, 01:05:01 am
  • ***
  • Non est hoc propter hoc sed propter est hoc
    • USA
    • doubletrend-zeta.neocities.org/
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.
Code:
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.
Re: Ifelse syntax issue
#2  January 18, 2015, 02:27:13 am
  • **
Target will only work when your opponent is in a hit state. Use enemy,alive instead.

Or something like that...
Re: Ifelse syntax issue
#3  January 18, 2015, 02:31:51 am
  • ***
  • Non est hoc propter hoc sed propter est hoc
    • USA
    • doubletrend-zeta.neocities.org/
Enemy gets me the same result as well.
Re: Ifelse syntax issue
#4  January 18, 2015, 02:45:57 am
  • **
Okay, that's not quite right. Are you sure your character actually goes into that state, and if so, any debug flood ?

DW

Re: Ifelse syntax issue
#5  January 18, 2015, 02:48:23 am
  • *****
    • USA
    • www.trinitymugen.net
Perhaps a RoundState, MatchOver, or WinKO trigger could work...?
Re: Ifelse syntax issue
#6  January 18, 2015, 08:03:11 am
  • ***
  • Non est hoc propter hoc sed propter est hoc
    • USA
    • doubletrend-zeta.neocities.org/
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.