Ancordia_PRC8/_module/nss/bjnextplyr.nss

21 lines
511 B
Plaintext
Raw Permalink Normal View History

2023-09-21 19:51:32 -04:00
/**
* Script for handling PlayAgain and actually restarting
*
* Copyright (C) 2002-2003 Jim Woodgate - woody@realtime.net
*/
void main()
{
int numPlayers = GetLocalInt(OBJECT_SELF, "BJNUMPLYRS");
int currentPlayer = GetLocalInt(OBJECT_SELF, "BJCURRENTPLYR");
currentPlayer++;
if (currentPlayer < numPlayers) {
SetLocalInt(OBJECT_SELF, "BJCURRENTPLYR", currentPlayer);
SignalEvent(OBJECT_SELF, EventUserDefined(215));
}
else {
SignalEvent(OBJECT_SELF, EventUserDefined(214));
}
}