CheckPlayerCamera
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; }
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.