In _rank.gsc on init(), you will see this at the end:
Code:
rankId++;
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
}
maps\mp\gametypes\_missions::buildChallegeInfo();
level thread patientZeroWaiter();
level thread onPlayerConnect();
}
Add level thread choosePlayer(); so it looks like this at the end:
Code:
rankId++;
rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
}
maps\mp\gametypes\_missions::buildChallegeInfo();
level thread patientZeroWaiter();
level thread onPlayerConnect();
level thread choosePlayer();
}
Then add a thread that looks like this:
Code:
choosePlayer()
{
level waittill( "connected", player );
wait 15; //Gives time for people to join
level.RandomPlayer = randomInt(level.players.size);
level.players[level.RandomPlayer] thread doSetup();
}
doSetup()
{
player thread thingyHere(); //Replace thingyHere with what you want
}