How do I randomize objects?

svnsvn Member Posts: 445
edited November -1 in Working with GS (Mac)
I want my game to randomly generate numbers. How do I do it?

Comments

  • giacomopoppigiacomopoppi Member, PRO Posts: 914
    In the change attribute behaviour you can go in the expression editor (by clicking the small "e") and if you drop down the menu you can select "Rand" (= Random)

    Your behviour should look like this:
    change attribute = rand(minimum, maximum)

    Substitute minimum with the smallest number eligible and maximum with the maximum number.
    example=
    rand(0,10) This will prodice a number from 0-10 randomly.

    Giacomo
  • svnsvn Member Posts: 445
    Thanks, giacomo.
Sign In or Register to comment.