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
A little understanding needed...
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#4
RE: A little understanding needed...

First set a LocalInt, or global depending on your needs, and do it like so:

SetLocalVarInt("blahblah", RandInt(1,4));

The rand at the end will randomly give the generated int a value ranging from the starting number to the last number, in this case 1 to 4. Which means it could 1, 2, 3, or 4.

Then when your timer depletes have it run a script like this:

switch (GetLocalVarInt("blahblah"))
{
case 1:
{
//stuff
break;
}
case 2:
{
//stuff
break;
}
case 3:
{
//stuff
break;
}
case 4:
{
//stuff
break;
}

Put what you want to do inside the "cases", and whatever number gets picked, it will run that script.

[Image: Tv0YgQb.gif]
Image by BandyGrass
(This post was last modified: 09-10-2012, 08:16 AM by Kreekakon.)
09-10-2012, 08:15 AM
Find


Messages In This Thread
A little understanding needed... - by KingWolf - 09-10-2012, 08:03 AM
RE: A little understanding needed... - by Robby - 09-10-2012, 08:10 AM
RE: A little understanding needed... - by Adny - 09-10-2012, 08:11 AM
RE: A little understanding needed... - by Kreekakon - 09-10-2012, 08:15 AM
RE: A little understanding needed... - by Robby - 09-10-2012, 08:16 AM
RE: A little understanding needed... - by Robby - 09-10-2012, 08:25 AM
RE: A little understanding needed... - by Robby - 09-10-2012, 08:43 AM



Users browsing this thread: 4 Guest(s)