...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
// take a snapshot of which player the human is at the start of the game var humanPlayer = selectedPlayer; // has human switched players? function checkForPlayerSwitch() { if (selectedPlayer != humanPlayer) { // human has switched players console("Naughty, naughty!"); } } setTimer("checkForPlayerSwitch",10000); // check every 10 seconds |
See also
- playerData – data about each player
- scavengerPlayer – the player ID of scavenger faction
- startPositions – start positions for each player (excluding scavengers)