HOW I MAKE LIFE

Talk about making games.

HOW I MAKE LIFE

Postby harleyb12 » Thu Oct 19, 2006 11:18 pm

:shock: ive tried countless times to make life BUT IT JUST WONT WORK plz post inst. and script thx :P
harleyb12
 
Posts: 7
Joined: Thu Oct 19, 2006 11:12 pm
Score: 0 Give a positive score

Postby Game A Gogo » Thu Oct 19, 2006 11:49 pm

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!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby makslane » Thu Oct 19, 2006 11:50 pm

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
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest