Push a button, and the scene changes to a random scene
andreaslolsen
Member Posts: 5
Hi i looking for some help, im trying to make a button, when pressed, changes the scene to random scene ( chooses a scene, i allready made).
Answers
Hi.
Lets say you have 3 scenes.
Make a actor, the button.
Make an attribute inside this actor, call it something like "RandomScene".
Make a rule, when touch is pressed random attribute "RandomScene" from 1 to 3.
Make 3 other rules, one for each scene.
Hope this helps
@andreaslolsen
As @Lycan says.
But you can also call a scene by its index.
So assuming scenes 2 to 5 are the ones you want to call randomly,
then use the Change scene behavior at index = random(2,5)
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Super did not see that you could change scene by index. Thx