Page 1 of 1

extra life

PostPosted: Fri Aug 05, 2005 3:07 am
by frozonfire
I need help on making EXTRA LIFE. Not a health bar, extra life

PostPosted: Fri Aug 05, 2005 3:12 am
by jj2197
Like an animation of an extra life.

PostPosted: Fri Aug 05, 2005 3:17 am
by frozonfire
i.e. Mario falls in a pit and dies. He had 5 lives earlier but now has 4.

PostPosted: Fri Aug 05, 2005 3:34 am
by jj2197
Do you mean making an EXTRA LIFE. Like as in an animation/sprite.

PostPosted: Fri Aug 05, 2005 3:38 am
by frozonfire
like in lives.

PostPosted: Fri Aug 05, 2005 3:41 am
by frozonfire
I.E.

Life = 5

Dies

Life = 4

PostPosted: Fri Aug 05, 2005 3:52 am
by jj2197
So you talking about how to make an actor have one less life when he dies. Correct

PostPosted: Fri Aug 05, 2005 4:07 am
by frozonfire
yes

PostPosted: Sat Aug 06, 2005 6:14 pm
by ondy1985
You'll need an integer variable that will store the number of lives the player has. Name it e.g. 'Lives' (or whatever). On game start you run the following script:
Code: Select all
Lives = 5;


When player dies, run this script:
Code: Select all
if (--Lives == 0) ExitGame();


Hope it helps.

PostPosted: Sat Aug 06, 2005 8:00 pm
by Just4Fun
Or if you are changing to a different Activation Region (ie Level 1) use:
if (--Lives == 0)
{
view.x = -120;//insert your numbers for Level 1 Activation Region here.
view.y = -160;//insert your numbers for Level 1 Activation Region here.
}


Incidently, if you are new to this great program, it would serve you well to work through the tutorials and read the docs. Game Editor is very powerful, and deceptively easy to use, but it is like every program, it takes some time and study to learn the ins and outs.

:wink: