Long UI button press problems

I want to call a (movement)function from my default pawn class as long as i pressing (with mouse) UI button, but it calls(successfully) only once and not continuing. Function could be re-called one more time if i press button again.
But i need it to be constantly called while i pressing this button.
button event:


the function itself:

Have no idea whats iā€™m doing wrong :thinking:

Hi Sha1l,

The pressed event only gets triggered once per press. There are a few ways to get multiple triggers - the easiest is to have a bool that you set to True on Pressed, and False on Released.
Then in your Tick event you can do your processing when the bool is True.

3 Likes