I’m pretty new to scripting in Blueprint, and I’d like to achieve the following (in Paper 2D, if that makes any difference):
When the character’s health drops to 0, the player can’t move the character anymore, and is required to press one of two buttons in order for the character to move again. Each button gives a slightly different result, but will always restore the character’s health, and re-enable the character’s movement.
I know how to script the health itself, but it’s the disabling movement and getting the buttons input that gives me trouble. I tried using the “Set movement mode” node, but the character’s sprites still updated when attempting to move; and I’m also stuck on getting the actual button input.
I’d appreciate any help or tips!
How can I disable Player movement keys, but allow Mouse rotate and Screenshot type keys (for a short time) - but allow [Simple Move to Node] to work?
Is there a way to define a list of [exact keys and/or the wildcard key/gamepad that the player has assigned for specific InputActions] - and disable only those [keys] for a [duration/toggle]?
If I use [Set Ignore Move Input], then [Simple Move] fails/gets disabled.
Yes, there is. You have to do it in the player / NPC code. You can use bool flags that will allow turning / movement etc, and you turn them on or off depending on what effect you want to achieve.
Can you show me the Node to ‘define a list of [exact keys and/or the wildcard key/gamepad] to disable’?
I tried searching related words, did not find. Ty
Or do you mean I have to put a Bool lock (in Char BP) before every Input I potentially may want to disable? (which I want to avoid doing), if there is an easier Node to define a list of Inputs by name = any key the player binds to that Input, the key will auto be affected by the No list.