Page 1 of 1

Aggrivating bug

PostPosted: Sat Mar 01, 2008 7:24 pm
by Freddy
I am making a fighting game/demo/experiment with GE. I have a falling down animation for the ai when it runs out of hp. There are two problems though. One is a glitch in GE, and the other is just an obsticle I will have to figure out. Heres the glitch: I went to draw actor ->script editor :
Code: Select all
if(CHP <1 && animindex !=8 || animindex !=9)
{
 change animation bla bla bla
}


What happens is that even though the "CHP" is 15, the script still runs. (this is the bug part)
The other thing that happens, is the other part of my code (not mentioned) acts against this section. For example: The AI moves to the player, and attacks. When the "CHP" is less than 1, it gets stuck between doing the other thing that it is supposed to do, and changing its animation to falling down.

If anyone has advice for me, I would like to here it. :)

Re: Aggrivating bug

PostPosted: Sat Mar 01, 2008 7:56 pm
by makslane
You must use:

Code: Select all
if(CHP <1 && (animindex !=8 || animindex !=9))
{
}

Re: Aggrivating bug

PostPosted: Sun Mar 02, 2008 12:39 am
by Freddy
Oh :oops: , thanks.