How to suppress player movement inside trigger volume?

Hello there,

I would like to force my player to freeze in place on Event Actor Begin Overlap for two seconds.
My experiments with some nodes locking the Input were not successful, because these nodes seems to do nothing.

greetings
Hirk

Hello,

I’m relatively new to blueprints and timers, but maybe this can help:

when Event Actor Begin Overlap, call Get Player Character (I assume you talking about third person game) -> Disable Movement -> Set Timer by Function Name - and specify StartMoveAgain custom function name which you will create next, and at Timer value write 2.

Create new custom function StartMoveAgain (name as you want, this is just example) which will enable your movement. Inside this function:
Get Player Character -> Set Movement Mode - and choose Walking mode

At Event Actor End Overlap call Clear Timer by Handle and connect it to timer node as shown :
https://docs.unrealengine.com/latest/images/Gameplay/HowTo/UseTimers/Blueprints/GHT6B_3.jpg
in your case instead of Fire events from example, will be Begin and End Overlaps events.

More on timers you can read : https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseTimers/Blueprints/

Again, I didn’t try that, but I think it should work, at least that is how I would try it.

Another way, MAYBE will work is:
Event Actor Begin Overlap -> Get Player Character -> Disable Movement -> Delay and set delay value to 2 seconds -> Get Player Character -> Set Movement Mode - and choose Walking mode
If it will not freeze WHOLE game for 2 seconds, you should achieve the result you want.

Hope this info helps or push you in proper direction for achieving your desired result. Good luck :slight_smile:

Thanks for replay!
My Problem is not about timing. I wants to achieve, that the Charakter stops moving, even when I am pressing the W key.
In your replay you wrote ->Disable Movement->. I have no idea how to do that. I tried to lock the keyboard input via input node, but that has no effect.

When you click right mouse button on graph editor, you can choose to create Get Player Character node. I assume what you control is player character. Then drag pin for this node to create new node and choose Disable Movement. As shown at tooltip, it disables movement of character, so even if you press W, the character should stand still.
What I wrote about timing is I suppose you will want to restore ability to move after 2 seconds, so I proposed you a way to restore movement.

If you want to simply try my suggestion, use Get Player Character -> Disable Movement as soon as you overlap trigger.
This blueprint script should be written inside main character which you control, in this case it should work smoothly.

Thanks again, I will try this.
I wasted hours with searching nodes in GetPlayerPawn and GetPlayerController. The solution now is to use GetPlayerCharacter.
If it were possible to select nothing, right click and insert “disable” to find all existing nodes with this name in, I would be very happy with blueprint.
But for unknown reason this is not working. So I never will get better with this frayed ****.
Thank you for help.

Try unchecking ‘Context Sensitive’ after you right click to type in the node name.