-
Last Fame Code?
I need help making a code for my game. When you lose a man it goes to frame 20 ( "manlost" ) and I want it to go to the frame you were last at, when you click "continue". Each frame is a level, starting @ 2. Thanks for your help if there is such a code.
-
On each frame you could go: lastLevel = _currentFrame;
Then on your frame 20 you could go: gotoAndStop(lastLevel);
~MD
-
you can make a variable that stores the last frame you were in for example:
This should written in the actions when you loose a man, where it says to go to "manlost"
Code:
_root.frameToGo = _root._currentframe;
_root.gotoAndStop("manlost");
Then when you want to go back to the last frame where you were, for example using a button you should write:
Code:
on (release){
_root.gotoAndStop(_root.frameToGo);
}
And that's it!
-