Page 1 of 1

Health Codes

PostPosted: Wed Oct 25, 2006 9:36 pm
by Hedfone
alright, I know that the topic of health bars/accesories has been flogged to death on this forum but....once more,

on the 'Create Actor' of my health meter I place the code:

Code: Select all
animpos=nframes;


and change the animation direction to stopped.

Then, on the collision with my enemy, I put the code:

Code: Select all
Health.animpos=-1;
if ((Health.animpos-1)<0)
{
DestroyActor ("Player");
}


This WOULD be fine except that when I collide, it kills him automatically. What am I doing wrong?

PostPosted: Wed Oct 25, 2006 10:30 pm
by makslane
Use this:

Code: Select all
Health.animpos -= 1;

PostPosted: Wed Oct 25, 2006 10:35 pm
by Hedfone
thanks makslane, once again you've saved my game's butt :D