Hi everyone, its been awhile. I’m still working on the battle engine, and I’m up to the phase where I’m programming a in-detailed enemy AI(its turn-based btw).
I’ll cut straight to the chase. For some out-of-the-whack reason, “else if” doesn’t work, but “else” does.
Heres my current code:
if(_root.enemymana == 20) {
enemyAttackList = [];
enemyAttackList.push([COLOR=SeaGreen]"Laser Blast","Arrow Shot","Focus","Normal"[/COLOR]);
[LEFT] currentAttack = enemyAttackList[1]
[/LEFT]
} else { [COLOR=Gray]//if (_root.enemymana > 20) {[/COLOR]
enemyAttackList = [];
enemyAttackList.push([COLOR=SeaGreen]"Normal"[/COLOR]);
currentAttack = enemyAttackList[0]
}
}
Now this works, but when I implement “else if”, it won’t cycle through it. I’ve tried taking out “else” and putting “if” instead, but it won’t budge either.
Any bright ideas?
-Jephz