How to simulate a sequence of mouse clicks?

I need to repeat a sequence of mouse clicks many time in the scene, how can I simulate those mouse clicks event pro grammatically in blueprints.

I just want to simulate “real” mouse clicks. This would be use to have a mapping of hand gesture inputs to those mouse clicks for later use.

So do you need to run a specific blueprint behavior multiple times or do you just want to simulate your “real” mouse clicks?

Thanks for your answer, but this doesn’t work in my case. This case cannot trigger the standard pipeline of “Right Mouse Button” on other actors in the scene (i.e. I want that tap event from gesture input triggering the same “onActorClicked” and other related events as a general “Right Mouse Button” does).

Make an event with the same signature as the real one, and hook the execution pin up to the same place.

Call your custom event with the same input you get with real stuff (you may have to add some debugging to the real event to figure out what you receive in the first place).

Like this:

Given that you want to simulate the actual mouseclick event globally, I believe the answer to your question is:

It isn’t possible in blueprints.

However, if you are determined enough, you could cheat and make a global object with an event dispatcher, and then wire each of your actors that handle mouseclicks up to that event dispatcher and locally call the mouse click event whenever a message is sent to the dispatcher.

It looks tedious if I have a large number of actors for this solution.
Will it be easier to have this emulation through C++? Or could you provide any hint which set of files in unreal engine are possibly related to those mouse clicks events for me to start with?

I certainly believe it would be easier to call directly into the engine. I am not familiar with input handling code myself, but perhaps a good place to start would be Engine/Source/Runtime/Engine/Public/UnrealClient.h – as it appears to have many mouse-related functions.

Thanks. I would take a look on this point to seek a solution.