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]Change to specific random map
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#10
RE: [SCRIPT]Change to specific random map

(11-19-2012, 07:09 PM)Kreekakon Wrote:
(11-19-2012, 07:00 PM)The chaser Wrote:
(11-19-2012, 06:04 PM)Kreekakon Wrote: SetGlobalVarInt("maper", RandInt(1,3));
While (GetLocalVarInt("maper")==2)
{
SetGlobalVarInt("maper", RandInt(1,3));
}
That would still have a chance to choose two.
No, it wouldn't. This is how the script would go:

1. Randomly pick from 1 to 3

2(a). If you get something besides a 2, everything keeps going normally.
or
2(b). If you get a 2 you will enter the "while" script, because "maper" being equal to 2 fulfills the conditions under which the while will run.

3. The script inside the while will pick a new number for maper at random, also from 1 to 3. It will keep repeating this process until "maper" is no longer 2, because as long as it is, the while script will never end, and keep repeating itself.
You are a Genius.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-19-2012, 07:19 PM
Find


Messages In This Thread
RE: [SCRIPT]Change to specific random map - by The chaser - 11-19-2012, 07:19 PM



Users browsing this thread: 1 Guest(s)