Disabling the players "use" action
Posted: Sat Jun 12, 2021 3:16 am
Hi,
I have made a custom menu that the player can access ingame whenever he/she wants. It also freezes the game using PowerTimeFreeze and SetPlayerProperty().
Of course, the player can still press the "use" key to activate switches, doors or anything. Which makes sense from a technical perspective, though it doesn't make sense for the player.
I know that using Aprop_TotallyFrozen doesn't disable the "use" key. I'd like to know if there is a way to make the player unable to use something. Temporarily morphing into a class with a Player.UseRange of 0 is problematic due to inventory and user variables.
Is there a way to do this in zscript? I am very poor at it so far, so maybe there is a way there that I am unable to find.
I have made a custom menu that the player can access ingame whenever he/she wants. It also freezes the game using PowerTimeFreeze and SetPlayerProperty().
Of course, the player can still press the "use" key to activate switches, doors or anything. Which makes sense from a technical perspective, though it doesn't make sense for the player.
I know that using Aprop_TotallyFrozen doesn't disable the "use" key. I'd like to know if there is a way to make the player unable to use something. Temporarily morphing into a class with a Player.UseRange of 0 is problematic due to inventory and user variables.
Is there a way to do this in zscript? I am very poor at it so far, so maybe there is a way there that I am unable to find.