Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Define Player_0_TID 32000
- Script "Player_Enter" Enter
- {
- // Not needed or desired in TitleMaps.
- If (GameType() == Game_Title_Map) Terminate;
- // Which Player?
- Int ThisPlayer = PlayerNumber();
- // Cancel if somehow called by a non-Player.
- If ((ThisPlayer < 0) || (ThisPlayer >= 32)) Terminate;
- // Unique Player TID. Make sure nothing else in the game has it!
- Int ThisTID = ThisPlayer + Player_0_TID;
- Thing_ChangeTID (ThisTID, 0);
- Thing_ChangeTID (0, ThisTID);
- While (True)
- {
- // They've left this body?
- If (ActivatorTID() == 0) Terminate;
- // Abort if they're gone.
- If (!PlayerInGame(ThisPlayer)) Terminate;
- // Other stuff goes here.
- Delay (Const:1);
- }
- }
- Script "Player_Respawn" Respawn
- {
- // Let's just re-call the main script.
- ACS_NamedExecuteAlways ("Player_Enter", 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment