Changing scenes
Hey everyone,
when my actor succesfully completed the level, I added a button to go back to the choose level menu, and when I go back and choose again level 1 it is not loaded again, means I need something like this in my choose menu...
when choose level 1 is pressed reset scene level 1 ?!
How would this work?
when my actor succesfully completed the level, I added a button to go back to the choose level menu, and when I go back and choose again level 1 it is not loaded again, means I need something like this in my choose menu...
when choose level 1 is pressed reset scene level 1 ?!
How would this work?
Comments
1),set each "sceneID" a unique number, eg. set level 1's "sceneID" to 1, set level 2's "sceneID" to 2 and so on.
2), create an invisible actor named "xxx" , drag it into each scene.
3),double click "xxx" and unlock it. Drag a "change attribute" behavior into it and set change "playing scene"(in game-playing scene)to "sceneID"(in Current Scene-sceneID).
4),give level 1 button (which is from choose level menu) a rule which is "when touch pressed" + "playing scene ≠ 1 ", and drag a "change scene" behavior under this rule to change the scene to level 1 scene. Plus, u need give level 1 button another rule which is "when touch pressed"+"playing scene = 1 ",and drag a "reset scene" behavior under it.
that it. hope my method can help u.
P.S. my English is poor, if u donnt understand ,donnt hesitate to shout :P
Good luck!