i love wick editor so i want to make a point and click game but i don’t know how to do a retry button so please help me please
Usually retry buttons resets game to its default.
For a simple point and click it could be as simple as a
gotoAndPlay(“start”);
command (where “start” is the name of first frame of your animations)
if your game has more code you probably need to do some variables reset.
Like score, levels and such.
have a look at the learning section
the tutorial “making things interactive” will show you how to do that
no my point and click game is big it will have so many frames
i hope i did not make you mad
so a:
gotoAndPlay(“start”);
would be enough. correct?
Well, the easiest way to reset a game is by having the window reload…
window.location.reload();
However, it takes longer to reload a window than it would if you try to turn all variables that you used to zero and reset everything.
Step one in restarting a game would be resetting all variables.
For example:
MyVariable = 0;
/*
you don't have to reset it to 0
if you have another desired
default value
*/
Step two would be to place all objects back in their original x and y position.
For example:
ClipName.x=30;
ClipName.y=30;
/*
Replace numbers
with the default x
and y positions of
your clip.
*/
And step three, lastly I think, would be to take the user to a certain frame.
For example:
gotoAndStop(1);
thank you so much i did not know about that
and the exemple is funny die retry i will send you the game when i finish it its a fangame of henry stickmin it took me hours to figure it out intil you told me that
No problem!