0
\$\begingroup\$

I am trying to do the top down project from scratch.

I can already get the actor to move toward the mouse click:

enter image description here

Only I need to keep clicking several times to change its path and keep walking indefinitely.

I would like to know how to keep it moving while I hold the mouse button.

In the previous version (4.21) this code below fit perfectly, so I managed to do that (the condition was a variable that only became false when I released the mouse button):

enter image description here

But now I can't make this connection (4.22).

I searched for some functions and even searched the new documentation for this loop (While Loop), but nothing worked.

Link (While Loop BP UE4):

https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/FlowControl/index.html#whileloop


Player Blueprint:

enter image description here


As I could do this before, you can see in the answer to this question:

How to make my character walk by clicking and holding the mouse button?

\$\endgroup\$
0
\$\begingroup\$

Why dont you do it in Tick ?

You still can set the boolean variable on input action - and then use EventTick with conjunction of delay and send the player to the mouse location.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.