Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Using an Event - randomly pick a number (shows text)?

Hi.

How do I set it so that in an event (eg. my bulletin board) it picks a random number, say between 1-10 and depending on what number it is, it shows a different piece of text for each number? It is a random tip of the day board.

Example:

1 = Save regularly
2= Make sure you've talked to everyone before you declare you are stuck

When you click the bulletin event it picks either 1 or 2, and depending on which no. it chooses, it shows the appropriate text.


Thanks
 

Nachos

Sponsor

pretty easy. Go to control variables, pick a variable and go to "Random" and set the range.

After that on the same event, create a conditional branch with:
Code:
 

Conditional branch: if [001-variable] = 1

 

Text: hello

end

 

--

 

Conditional branch: if [001-variable] = 2

 

Text: Sucka!

end

 

that should do the trick
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top