Input_trigger_devices triggering subscribed functions multiple times

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Summary

When using the input_trigger_device with Verse and subscribing to the events, any functions subscribed to the Pressed or Released events fires multiple times.

Steps to Reproduce

  1. Add input_trigger_device to the map, set it up to for instance the Swap Quickbar Creative Input, set it to consume the input, for the Register Player Behavior select Required Registered and make sure it’s enabled at the start.
  2. Create a verse device with a reference to an input_trigger_device
  3. Create a function that prints a string.
  4. Subscribe the created function to the input_trigger_device’s Pressed or Released event.
  5. Register the player to the input_trigger_device OnBegin
  6. Launch the session, press the button and notice that the function gets printed multiple times.

Expected Result

The event fires only once, running the function once and thus printing the string only once

Observed Result

The event appears to fire multiple times, running the script and print multiple times, sometimes up to 4 times!

Platform(s)

All

FORT-783104 incident has been created. Status is ‘Unconfirmed’.

I also observed it spamming the same action

Some more information that I have come across.

It appears that this behavior is also observable without verse.

If one hooks up an input_trigger_device “On Input Pressed” Event to a Switch’s “Toggle State” Function and sets it up with for example Swap Quickbar Creative Input or Crouch Creative Input it will turn the switch on and then very quickly turn it off again, indicating multiple firings.

However! This whole problem does not appear to be the case for the Harvesting Tool Creative Input, which only fires the function once and properly switches the Switch’s state once per input.

Hope this helps tracking down the issue.

For the time being I have been using a “Debounce” on the input triggers. Store a float with the current simulation time and compare the last stored time on input trigger. If no enough time has passed then I return out of the function.

related issue I reported a little while back:
Duplicate Events When Using Multiple Input Triggers - General / Issues and Bug Reporting - Epic Developer Community Forums (unrealengine.com)