Page 1 of 1

help with game

PostPosted: Mon Jun 12, 2006 8:58 pm
by Zehper48
Hi, i am making a frogger game but, i need help with making the cars move automaticaly over and over, and how to end the game after you lose 3 lives :) :D :!: :evil: :twisted:

PostPosted: Wed Jun 21, 2006 12:55 pm
by speckford123
Well for the cars try an out of vision event to destroy them and a destroy actor event to re-create them and you want on a create actor event with script editor " CreateActor("car") " and create it where you want it. As for lives make an actor variable (call it lives, etc.)
and when you die have a destroy actor event and try,
if (lives>0)
CreateActor("player");
if (lives>0)
lives=lives-1;

This should only create your player when lives are greater than 0.

PostPosted: Wed Jun 21, 2006 12:59 pm
by speckford123
sry, also put it on view so on create actor " lives=3 "
and for the code put
if (view.lives>0)
CreateActor("player");
if (view.lives>0)
view.lives=view.lives-1;

and also on view put a draw actor event
if (lives==0)
Moveto("view" 0,0,") // or close window etc. whatever you want it to do.

PostPosted: Wed Jun 21, 2006 1:23 pm
by Zehper48
thanks alot

PostPosted: Wed Jun 21, 2006 1:23 pm
by Zehper48
thanks