Choose between specific numbers

CORE GameCORE Game Member, PRO Posts: 280
edited November -1 in Working with GS (Mac)
Is there a way to choose a number in sequence, for example saying random(1,5) it can be 1,2,3,4,5 but if I want to say i want either 1 or 3 ONLY, how should I achieve that?

Comments

  • CORE GameCORE Game Member, PRO Posts: 280
    I wonder why no one is able to figure out an answer for my question, is it not possible?

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Try this:

    Use two integer attributes: randNum and oneOrThree

    Change Attribute: randNum To: random(0,1)

    When self.randNum = 1
    ---- Change Attribute: oneOrThree To: 1
    --Otherwise
    ---- Change Attribute: oneOrThree To: 3
  • CORE GameCORE Game Member, PRO Posts: 280
    Yeah that works, I just thought there is an easy way just like Random(1,3) I thought there is some thing like the word "Random" for example in SQL we can say "IN (1,3)"

  • CORE GameCORE Game Member, PRO Posts: 280
    for some reason I got double posts (I removed it by typing this)

Sign In or Register to comment.