Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help RandInt and Switch Statements.
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#7
RE: RandInt and Switch Statements.

Huh, I never knew that. When I use a switch statement, I do something like this
int x = RandInt(1, 3);
switch(x) {
    case 1:
        // do something
        break;
    case 2:
        // do something else
        break;
    case 3:
        // do something else
        break;
}

Well, everyday's a school day! Smile

In Ruins [WIP]
(This post was last modified: 04-13-2013, 05:48 PM by NaxEla.)
04-13-2013, 05:48 PM
Find


Messages In This Thread
RE: RandInt and Switch Statements. - by NaxEla - 04-13-2013, 05:08 PM
RE: RandInt and Switch Statements. - by Kreekakon - 04-13-2013, 05:23 PM
RE: RandInt and Switch Statements. - by NaxEla - 04-13-2013, 05:48 PM
RE: RandInt and Switch Statements. - by Kreekakon - 04-13-2013, 05:57 PM



Users browsing this thread: 2 Guest(s)