Question about random numbers

1UpGamestudio1UpGamestudio Member Posts: 213
edited November -1 in Working with GS (Mac)
I would like to use the random function with a minimum and a maximum, but skipping numbers.
Example:
"random (1,5)" but the program will only count 1-3-4-5 in random
2 is not count

Comments

  • mangaroomangaroo Member Posts: 419
    I remember somebody asking before and this was the only solution i remember:

    when attribute = 2
    +1
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    A way that'll work here is to make a random(3,5) put into attribute, let's call it FirstRand. Then a random(0,1) put into attribute Juggle.

    So that when Juggle is false put 1 into FinalNum
    when Juggle is true, put FirstRand into FinalNum.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • mangaroomangaroo Member Posts: 419
    that's a pretty wicked workaround - good to know cheers
  • 1UpGamestudio1UpGamestudio Member Posts: 213
    thanks
Sign In or Register to comment.