Assign the input of " Is Mouse Button Down"

Hey guys,
i actually started playing around with unreal engine 4 and i am stuck with a WhileLoop.
I just want to repeat moving the static mech while the middle mouse button is hold down.
My problem is: What has to be connected with the input of " Is Mouse Button?


Sorry if the question is too stupid.

greets Ionix

Im not any kind of expert btw too but i dont see any node you setting your mouse is pressed. Also if im not wrong You dont need a branch there or even a while loop.

Loops also are very bad to use when you prees the a button or key action they mosty break cause the start to repeat the action thousands of time in a second and and the game get unresposive.

I suggest you to do something like that.

I just use to open a gate when the desired button is pressed. Use even tick on the gate entrance anc desired inputo on open close gate. You can also put an delay if you want to uppdate the function less frecuently.
Like for example moving the mesh 100 units every second or so

If you really need it this way, you can use the PlayerController for this:

Or you just use the Gate that terror grunt showed you.

Hey terror grunt. Thanks for your super fast answer :slight_smile:
I’ve done it like this :


and it works like a charm :slight_smile:

thank you so much :o



Oh thank you eXi :slight_smile:

Well is it like i just used the wrong node ? Because " Is Mouse Button Down " awaits a pointer as input and your solution not :stuck_out_tongue:

I think i stay with the solution of terror grunt. But it is also good to see the syntax of other solutions to understand the blueprints.
I just learned python and played a little bit with c# so i have a small amount of programming knowledge.