How do I make a randomizer using global variables and or statements?

0 favourites
  • 3 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • I want to make a randomizer that has global variables and uses an or statement.

    For Example:

    Red = 0

    Green = 0

    Blue = 0

    Then I want the programming to be something like when they layout starts, it adds by 1 for either Red, Green, or Blue. So then if it ended up being Green it would say the color is green but I know how to do that.

    Is there anyway to code it like that, or is there an easier way?

    Please help!

    Thanks in advance!

  • I want to make a randomizer that has global variables and uses an or statement.

    For Example:

    Red = 0

    Green = 0

    Blue = 0

    Then I want the programming to be something like when they layout starts, it adds by 1 for either Red, Green, or Blue. So then if it ended up being Green it would say the color is green but I know how to do that.

    Is there anyway to code it like that, or is there an easier way?

    Please help!

    Thanks in advance!

    Doesnt this work?: ON start of layout > set variable current_color to choose(1,2,3)

    This would set it to 1,2 or 3, where 1 is blue, 2 is red, 3 is blue etc etc

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Something like this perhaps?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)