Go to random scene

ShpintShpint Member Posts: 404
edited November -1 in Working with GS (Mac)
Hey all,
I want to be able to go to a random scene when I touch on an actor. How can I do this?

Thanks

Comments

  • giacomopoppigiacomopoppi Member, PRO Posts: 914
    create an attribute, name it "change scene".

    then go to your actor:
    when you touch actor change attribute random (1, max number of scenes).

    still in the SAME rule:

    when attribute "change scene"= 1
    go to scene 1

    when attribute "change scene"= 2
    go to scene 2
    ect... :)
  • ShpintShpint Member Posts: 404
    With that, each time I touch the actor, it will take me to a random scene?
    Is it possible to go to a random scene, but never repeats?
  • FatalCrestFatalCrest Member Posts: 113
    Have a boolean attribute for every scene and call it like scene1Selected, scene2Selected, etc. Have them all false except for your first scene. Then somewhere in the random function have it check if the selected scene's sceneSelected attribute is true or false. If its true have it run the function again, if false go to the scene. I'd put out in code, but I've got a few things to do. Dx

    But this should give you the idea! Hope it helps! :3
  • ShpintShpint Member Posts: 404
    I don't really understand from the very beginning. Sorry, I know i'm being a noob, but I really don't understand.

    Thank you very much guys for helping me.
Sign In or Register to comment.