How to set long touch for gamepad?

How to set long touch for gamepad? I want to hold down touch for few seconds and then to open menu in my game. Also, I need regular touch to press widget buttons that are shown in the menu.

On InputTouch, you can have it fire into a Timeline or Timer of whatever length you need that sets a bool like longTouch to true. Make sure it is also setting longTouch to false at the beginning of each press, so it gets reset.

For distinguishing between long and regular touches, you would use a Branch to check for longTouch on the Release exec of InputTouch. True, menu. False, regular. You also need to make sure that Release is stopping the Timeline or Timer that you initialized, so it doesn’t set that bool anyway. That’s easily done with a Sequence.

In my example, I used a Timeline. You can double click the Timeline and set the time up at the top of its editor. Using Play From Start is necessary so it always starts the time from 0 when you touch.

Thanks DG Gage,
I set it to work with timeline but I cannot set to work with regular short touch. How did you set the functions for button press and menu press? The problem is that I have my menu set to work with keyboard and mouse I now I want to change it to work with touchpad to but not to change existing blueprints…

sry for this… I found the mistake :slight_smile: thanks for the answer