Page 1 of 1

Disabling the players "use" action

Posted: Sat Jun 12, 2021 3:16 am
by FFFFRRRR
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.

Re: Disabling the players "use" action

Posted: Sat Jun 12, 2021 5:20 am
by Jarewill
With ZScript you can directly modify the player's properties like you would with variables in ACS.
For example, this powerup will take away the player's ability to use [Use] and give it back once it's taken away:
Spoiler:

Re: Disabling the players "use" action

Posted: Sat Jun 12, 2021 6:07 am
by FFFFRRRR
Thats wonderful. Tested it and it works.
Many thanks!