Page 1 of 1

HOW I MAKE LIFE

PostPosted: Thu Oct 19, 2006 11:18 pm
by harleyb12
:shock: ive tried countless times to make life BUT IT JUST WONT WORK plz post inst. and script thx :P

PostPosted: Thu Oct 19, 2006 11:49 pm
by Game A Gogo
mmm, asking a question like that is prtty worthless, you gotta discribe what you want to MAKE, becasue everyone is tryinbg to get things to life :wink:
but there are many things you can do to make it look real "life".

anyway, if you explain the problem, i'll be willing to help you!

PostPosted: Thu Oct 19, 2006 11:50 pm
by makslane
1) Add an Actor variable life (use the variables button in the Script Editor).
Don't use a global variable, so you can have several actors with your own lifes.

2) In the 'Create Actor' of your player event set the initial value:
Code: Select all
life = 5;


3) In some event, like a collision with an enemy, decrease the life value, and make the test:

Code: Select all
life--;
if(life <= 0)
{
   //Game Over
}