Hello.
Is there a way so widget button doesn’t trigger twice [on click] and when releasing from [on hold] ?
I understand I can make button react [on release] instead or [press and release]
but (if I’m not super wrong) whatever I pick in some way I trigger twice.
Example: I have a button for horn. If I press once I just horn. If I hold the button, I’m horning as long as I hold.
So any way I set it up, I play two different sounds (@once) at the press or at release .I even tried assign sound [on release] but its always triggered anyway.
I don’t quite understand well what you mean, but I see that it triggers twice?
I went on unreal and settled up on press & held, and it works just fine, whenever i hold it plays the sound i have on loop, and whenever i click it plays the sound i set once. Can you elaborate?
I have one button in HUD
with OnClicked (with [Precise Click] on Click Method)
and OnPressed (with [Button Release] on Press Method)
There are many combinations for Press and Click Method, and I think I tried them all, anyway
I have Sound_A attached to OnClicked
and Sound_B attached to OnPress
My problem is: either I click the button, or press (no matter for how long) then release, and no matter the Interaction settings, my Button will always trigger both sounds.
On clicked they will be played instantly.
On pressed it will be right Sound_B, but as soon I “release the press” it will trigger “the rest of the click”. So on release, Pressed button will behave as clicked and play Sound_A.
If you have both of them, the OnPressed is starting it and will make the horn keep going.
The issue is that the OnClicked doesn’t start until it is ‘Pressed’ and ‘Released’.
Take the OnClicked off.
If this answer resolves your issue please select it as the answer for future users to see a resolution!
I am not sure if Your suggestion would work. I don’t understand my spaghetti anymore so I need to give Your idea a better try, but I’ve found great solution. Not sure if it would worki in widget event graph though. Anyway here it is: Unreal Engine 4 - Speed Tricks - Hold/Tap Events - YouTube and thank You for Your support.