Disable/Enable Character Movement

Hello everyone, I can’t build the logic of disable/enable character movement well, I will explain better. I created an Actor Blueprint where I put a Capsule Collision and in the Event Graph I set the nodes like this: On Component Begin Overlap I connected the Execution Pins(The first Execution Pin and the Other Actor Execution Pin) to the Cast To BP TopDown Character node; then I connected the CastToBP_T&D Execution Pin to the Disabled Movement node. What do I need to add so that when I then press a random keyboard (example. the Enter key) the movements of my character are rehabilitated.

Thanks in advance for the answers.

PS: In the picture I attached I added more nodes

Try this in the top-down character BP:

image

2 Likes

unfortunately it doesn’t work

Just tested it in the top-down template and it does work:

Use breakpoints to ensure the script runs. Perhaps the input is not set up correctly.

1 Like

thank you very much, later i will check and let you know

Let’s say you’re not possessing the character (like in the template) and use AI to move it. If you add input and not enable it, it will not work. The above is in the player controller that always processes it.

can’t find me the node Disable Movement, idk why

Nodes are context sensitive:

Drag a wire first, then search.

1 Like

I don’t know why but that doesn’t work either

instead of acting on the BP_TopDownController, could you act directly in the actor blueprint of the capsule collision?

What does not work?

instead of acting on the BP_TopDownController, could you act directly in the actor blueprint of the capsule collision?

Yes, add input and enable it. But that’s quite awkward.


Consider adding breakpoints and observe the data flow.

1 Like

The thing that doesn’t work is that, when my character has blocked movements due to the interaction with the capsule collision actor blueprint, I press the 1 key on the keyboard and there is no undoing of the movement block caused by the actor blueprint mentioned before.
Where and how can I add and enable an Input?

Sorry for the trouble but to understand things I have to have it repeated 100 times LOL

In the player controller. Get the character whose movement you want to enable, and Set the appropriate mode.

I press the 1 key on the keyboard

Please do use breakpoints to see if you’re actually triggering it and ensure you’re sending the request to the correct instance of the character. I feel all this confusion stems from it.

1 Like