GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Randomize Scene

ShpintShpint Posts: 404Member
Hi,

I am currently making an app that will have a lot of scenes.
Each scene will have 3 buttons "Previous" "Next" and "Random"
Previous is go to previous scene and vice versa for Next
The question is: How do I go to a random pages? (That is not the menu page)

Thanks

Comments

  • chosenonestudioschosenonestudios Posts: 1,714Member
    Create a attribute game.scene

    When random is pressed change attribute game.scene to random(1,5)

    when attribute game.scene = 1 change to scene 1
    when attribute game.scene = 2 change to scene 2
    when attribute game.scene = 3 change to scene 3
    when attribute game.scene = 4 change to scene 4
    when attribute game.scene = 5 change to scene 5
  • ShpintShpint Posts: 404Member
    will that random the 5 scenes?
    I have over 100 scenes, does this mean that I need to do have the attribute for every scene?
  • firemaplegamesfiremaplegames Posts: 3,206Member
    Yes
  • tenrdrmertenrdrmer Posts: 9,934Member, Sous Chef, Senior Sous-Chef
    Ouch thats gonna be a big rule for 100 scenes.

    It's not my fault I never learned to take responsibility for anything. ;)

  • ShpintShpint Posts: 404Member
    Oh my, that's a whole lot of clicking.
    Any shortcut?
This discussion has been closed.