Help! Randomizing Random

RocketBrainRocketBrain Member, PRO Posts: 269
edited November -1 in Working with GS (Mac)
Is it me or does the random command only load once.

how do i get it to randomize a number each time i do the command?

right now i have it so i hit a button it change = random (1,4)

but each time i do it, it always generates the same number.

Comments

  • ChaserChaser Member Posts: 1,453
    Put it in a timer like every .5 seconds change to random (1,4)

    But if it always gives you the same number something is wrong
  • AsymptoteellAsymptoteell Member Posts: 1,362
    That's how it does the random. There's a weird workaround.

    DEMO: http://gamesalad.com/game/2197

    Hope that helps.

    Asymptoteell
  • RocketBrainRocketBrain Member, PRO Posts: 269
    for some reason i cant load the demos. drives me nuts
  • ChaserChaser Member Posts: 1,453
    Go to the creator and try to find the demo and just double click the icon on the left pane don't click the right where it says play and such
  • old_kipperold_kipper Member Posts: 1,420
    I had this problem and had heard that a way around it was to use a timer to generate an apparently random number. Working on the assumption that kids playing the game were going to take a fairly random time between goes (with less accuracy than 5th of a second), I put the game time in an index number to remove the decimal points and deducted that from the the actual game time, multiplied it by five and added 1. This gave one of six numbers that I pegged the dice animation throw to so it came out with much more random seeming number than the 'random'. If you sit and hit it again and again (on a beat in your head) you can on occasion get it to throw the same number but takes some practice.

    cheers kipper
  • ValanValan Member, BASIC Posts: 410
    An attribute can be setup in a control actor that gives random numbers from the start of the game.
    Access this attribute whenever you need a random number. As it only starts once there should be no sequencing.

    Cheers

    Valan
Sign In or Register to comment.