SetPlayerProperty — sets or clears a special player property
SetPlayerProperty (who, set, which);
SetPlayerProperty ( who, // Who to affect set, // Whether to set or clear the property which // Which property to modify );
Value | ACS Name | Description |
---|---|---|
0 | PROP_FROZEN | The player cannot move left, right, forward, or backward. However, he can still jump, shoot his weapon, and use things. |
1 | PROP_NOTARGET | Monsters that have not seen the player will ignore him unless he attacks them. Monsters that have already seen the player will continue to chase after him and attack. |
2 | PROP_INSTANTWEAPONSWITCH | The player will be able to change weapons instantly without having to wait for the old weapon to drop and the new one to rise. |
3 | PROP_FLY | The player will fly around as if he had the Wings of Wrath. |
4 | PROP_TOTALLYFROZEN | This is similar to PROP_FROZEN, except the player is restricted even more: All he will be able to do is press his use button. |
This special's function is the same whether you activate it on a line or use it in a script.
PROP_FROZEN was introduced to prevent the player from moving around during cutscenes. PROP_TOTALLYFROZEN is a more recent alternative that was introduced when it became apparent that the player was still able to do too much even with PROP_FROZEN active. Whichever of the two properties you use, you should be nice and offer a way for the player to skip long cutscenes. Both properties allow the player to press his use button, so you can position him in front of a line that will cancel the cutscene when it gets used.
If you use this special inside an open script, then it will always affect all players no matter what value you use for who because open scripts are activated by the world and not any particular player.
Prevent every player in the game from moving:
SetPlayerProperty (1, 1, PROP_TOTALLYFROZEN);
Allow every player in the game to move again:
SetPlayerProperty (1, 0, PROP_TOTALLYFROZEN);
Turn on notarget mode for the player that activated this special:
SetPlayerProperty (0, 1, PROP_NOTARGE);
ZDoom 1.17
PROP_INSTANTWEAPONSWITCH was added in ZDoom 1.23 beta 11
PROP_FLY and PROP_TOTALLYFROZEN were both added in ZDoom 2.0.36