CheckPlayerCamera
Jump to navigation
Jump to search
int CheckPlayerCamera (int player)
Usage
Returns the TID of the camera that the specified player is currently viewing. If the player doesn't exist (or has no camera somehow) or the camera is currently using any player as a viewpoint, then this returns -1.
Examples
This script deactivates all actors with a TID of 60 while the player is using a camera. This could be used to prevent enemies from attacking the player while he is doing so.
script 10 ENTER { while (CheckPlayerCamera(PlayerNumber()) == -1) Delay(1); Thing_Deactivate(60); while (CheckPlayerCamera(PlayerNumber()) != -1) Delay(1); Thing_Activate(60); Restart; }