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.

[Resolved] Random Command: Explanation

Status
Not open for further replies.

OS

Sponsor

Hello. I would like to know if someone could possibly answer a few questions about rand(max)?

1. How exactly does it work? I mean, if I put rand(2), are the possible outcomes 0, 1, and 2, or just 1 and 2, or are they 0 and 1?

2. Can I use rand(1+1) so that I never get 0, but 1 or 2 instead?

That is all...Thank you for any help, and good night.

~Broken
 
This topic has been resolved. If Akahi Aomitsu or any other users have any questions or further problems regarding this topic, please create a new thread about them.

Thank you!
 
Status
Not open for further replies.

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