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 Map choosing
ClayPigeon Offline
Member

Posts: 214
Threads: 13
Joined: Mar 2012
Reputation: 8
#2
RE: Map choosing

For this method, I recommend you naming your maps in the following order:
Map_01, Map_02, or map1, map2 and so on. I'll use the Map_0x for this example:
//At the first time
int rand_1 = RandInt(1, 10);
ChangeMap("Map_0"+rand_1+".map", "PlayerStartArea_1", "StartSound.snt", "OtherSound.snt");

//At later times
int rand_2;
do
{
rand_2 = RandInt(1, 10);
}
while(rand_2 == rand_1);

ChangeMap("Map_0"+rand_2+".map", "PlayerStartArea_2", "StartSound.snt", "OtherSound.snt");

//At the third time
int rand_3;
do
{
rand_3 = RandInt(1,10);
}
while( !((rand_3 != rand_2) && (rand_3 != rand_1)) );
ChangeMap("Map_0"+rand_3+".map", "PlayerStartArea_3", "StartSound.snt", "OtherSound.snt");

I hope you got my example.
(This post was last modified: 03-29-2013, 04:42 PM by ClayPigeon.)
03-29-2013, 04:40 PM
Find


Messages In This Thread
Map choosing - by FlawlessHappiness - 03-29-2013, 04:32 PM
RE: Map choosing - by ClayPigeon - 03-29-2013, 04:40 PM
RE: Map choosing - by FlawlessHappiness - 03-29-2013, 04:58 PM



Users browsing this thread: 1 Guest(s)