Changing scenes

GuaveMediaGuaveMedia Member, PRO Posts: 1,262
edited November -1 in Working with GS (Mac)
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?

Comments

  • zellhuangzellhuang Member, PRO Posts: 79
    u can add an game attribute (real) named "playing scene" and give each scene an attribute(real) name "sceneID".
    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
  • zellhuangzellhuang Member, PRO Posts: 79
    Alex0407 said:
    *Shouting* gg

    it doesn't work? Or u cann't understand what I say?
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
  • zellhuangzellhuang Member, PRO Posts: 79
    Alex0407 said:
    I don't understand it ....

    u should learn how to use attribute first. if u donn't know how to use attribute, I recmmond u to watch the tutorial video named "Attributes in GameSalad" posted by Tshirtbooth on Youtube. Just open up Youtube and search it, u will easily find it.
    Good luck!
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    I know how to use attributes zellhuang but I simply just don't understand what you were trying to tell me^^
Sign In or Register to comment.