Randomize Scenes

Discussion in 'Buildbox General Discussion' started by AndyG, Feb 1, 2016.

  1. AndyG

    AndyG Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,100
    Likes Received:
    915
    Is there any method to control the number of total times randomization of scenes occurs?

    Example: I have 10 scenes. All Randomized. Can I control that say after a total of 20 scenes has been shown to the gamer the game completes (Game Over scene/Next world etc)?
     
  2. steve

    steve Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    103
    Likes Received:
    36
    If say each of your scenes was 500 pixels long. Then set all the randomized ones up with a start of 0 and end 10000. Then setup a scene with start 10000 end -1 that takes them to either the next world, game over etc.
     
  3. AndyG

    AndyG Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,100
    Likes Received:
    915
    And that can occur automatically after a total of 20 randomized scenes have been shown?
     
  4. steve

    steve Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    103
    Likes Received:
    36
    20 x 500 = 10000. So when it hits that point it will no longer show the randomized scenes and will move on to you end scene, which you can use to send the player wherever you want.

    So change the 10000 figure to be whatever 20 times your scene length is. If the scenes are of different lengths you could do something similar by averaging out the lengths, but you wouldn't necessarily always get the end scene after exactly 20 scenes, as it would depend upon which scenes had been randomly selected.
     
    tomwhite3d and AndyG like this.
  5. AndyG

    AndyG Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,100
    Likes Received:
    915
    ah ok I've got you. Understand the solution now. Thanks for the info @steve :)
     

Share This Page