Re: How to randomise scenes when an actor button is pressed?
GoodnightMoon
Member Posts: 23
Hellooo!
Okay, so I currently have 5 scenes in my game, 1 of which is a 'Game Over' pop up window that gives you your high score and has a 'Play Again' button. Right now, the Play Again actor only changes to 1 other scene, however I'd like to randomise the scenes so that when clicked, it can randomly bring me to another scene.
How would I go about doing this?
Many thanks!
Comments
You can do it this way
when touch is pressed
change scene behavior
Go to scene: " at index "
In the scene index : for example if you want to pick between scene 2,3,4,5 type random(2,5) or if you want to choose between scene 1,2,3,4,5,6,7 type random (1,7)
for some reason it doesnt allow me to upload a pic
@Icebox
Ahhh thanks so much Icebox, that worked great!