View Full Version : How to create a reset button?
driaxx
09-29-2008, 07:28 AM
Basically I have a platform game and after the character dies, I've created a button in the same keyframe when the character dies. Does anyone know the actionscript, or how I could go about transforming this button to make it reset the level? :confused:
Thanks a lot in advanced,
Andrea
xdeath
09-29-2008, 08:52 AM
telling it gotoAndStop at the same keyframe your currently at might work.
driaxx
09-30-2008, 03:45 AM
Hmm yeah I've already tried that but it just basically makes the button inactive. When I link the button to the 'Game Intro' it still doesn't refresh, because when I press play it goes back to the same image of the character dead with the replay button.
atomic
09-30-2008, 03:52 AM
Re-load the movie?
xdeath
10-03-2008, 04:27 AM
Re-load the movie?
yeah that our make a variable which determines if the character is dead or not and then right a code like this:
// some editing will be needed such as variable names,
// and this should be place on character
if (dead==true){
// now list the starting off values of all your variabes.
// or in other words all the variables you need to change
// so it looks as if it just restarted.
}
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.