Quote:
Originally Posted by deadlyrun123
In my fighter game, I have made characters that have lives(by creating a whole number property) and when a character's lives reaches zero, the game ends. I know how to add a text object and a mouse click listener, but what I do not know is how to make it start again as soon as you click on the restart button after the game has ended. For example, if I click on the text object, it should be redirected to the start of the game, so 'thisEventRunning'=true, and 'thisGameOver'=false.
|
If I understand what you are asking, you need a method that sets all the variables and objects to their initial condition and then runs the game again. This probably means that you need the initial pose and position for any object that moves. Basically something like:
Code:
init
// initialize all global variables, and movable objects
call run
run
// go until no lives remain
ask do you want to play again?
if yes then
init
else
// Do nothing
// exit movie