Is there a node to exec a mouse click and another to rotate without player intervention?

I’m trying to find the nodes to execute two actions, for which the character would automatically rotate up in a specific direction, and after that, it would do the equivalent of pressing the left mouse button, all without user intervention.

All I could find are tutorials on how to attach the character’s movement to the mouse input, but in this case I need to achieve that without user intervention. Is that possible?

1 Like

Just create a function, macro or event for each sequence, place the function / macro / event on the input event so user can run it and you can also call it on anything else. Makes sense?

Thanks, although a little advanced for my knowledge. I just started learning UE a couple of months ago. When you say macro, is that kind of like when you record a series of actions in a software?

These might help:

1 Like

Thanks, I’ll take a look.

OK so I read all this, but it doesn’t really tell me how to fake a mouse click. I did find the way to make it rotate, and while I did that in a function and it worked, the same nodes are available in the event graph, so I can do either. But I can’t find a node to trigger a click in either functions, macros or event graphs.

The point is that the click event is just one way you have to call functions / macros / events.

Take this for example:

On click I call the DoStuffOnClick function that has everything that I want to happen on click, but I can also call that function on any other button or event and place it before or after other functions / macros / events.

This way everything I did on click is now run in sequence with other stuff.

These also do the exact same:


Hope it helps.

1 Like

Thanks for explaining it in more detail. Now, in your graph, you have the node “InputAction LeftClick”, but I think you have a newer version in which they changed the name of the node, I’m on 4.23 and I think that same node is called “Left Mouse Button”, because it looks the same, and has the same three outputs.

Now, I understand the part about calling the function from another event graph, but what I don’t see in your example is the ability to fake a click as if it was the actual person clicking the left mouse button.

To explain this better, you know when games in arcades still play when nobody is using them, and they basically display a play routine, and the computer player does lots of things, like (if it’s a FPS) shooting bullets or laser rays, or whatever, and moves, pivots, etc.

Well, that’s what I’m trying to achieve, to trigger an automatic left click, along with a rotation, when the user presses the right click in a full screen widget, or it can be a button in that widget that the user has to left click, either is fine, but after the user manually does either of those, then that has to trigger two actions, one is to rotate up (this one I found how to do), then a left click, and finally rotate back to the original angle.

So like I said, I found the way to execute a rotation, but what I also need is the way to execute a left click without the user actually clicking the mouse at all.

1 Like