Page 1 of 1

Making Lives

PostPosted: Thu Jul 26, 2007 12:44 am
by arcreamer
hey im trying to make a life dissappear when i get hit so whats wrong with this code?

if (character_lives==2){ DestroyActor("Life1")} (character_lives=2);

PostPosted: Thu Jul 26, 2007 1:33 am
by d-soldier
Where is that code being used? What actor/what event? Its a bit of a paradox really, as the character lives variable being "2" destroys an actor and then makes the varibale "2", which would cause it to do all this again, and again...

if (character_lives==2)
{
DestroyActor("Life1");
character_lives=2;
}

PostPosted: Thu Jul 26, 2007 1:38 am
by arcreamer
i put it under the main player so when he gets hurt and his lives go from 3-2 then i want the Life3 actor to dissappear :P did i do it wrong? cause i dont understand scripting much yet =(

PostPosted: Thu Jul 26, 2007 2:29 am
by d-soldier
I'm making a demo for you...

PostPosted: Thu Jul 26, 2007 2:58 am
by d-soldier
Heres a demo, all you have to do is walk into the lasers and die, observing the "lives icons" deplete, then when none are left, game over. There are numerous ways to accomplish this within GE, this is merely one.

PostPosted: Thu Jul 26, 2007 5:26 am
by arcreamer
ok cool ill download it now

PostPosted: Thu Jul 26, 2007 5:30 am
by arcreamer
how did u group 3 actors into one for the meter?

PostPosted: Thu Jul 26, 2007 5:37 am
by DilloDude
It is probably just one actor with an animation. The animation would go: 0 lives, 1 life, 2 lives, 3 lives through each frame. Or something like that.

PostPosted: Thu Jul 26, 2007 5:43 am
by arcreamer
lol check out my main menu! its an animation in the game just not in the pic but yeah the car is moving also! its awesome haha my first main menu and fun game! JET CHICKEN

PostPosted: Thu Jul 26, 2007 5:45 am
by arcreamer
here it is