Requires VaM v1.20 or newer
Trigger The TriggerThis simple plugin is intended as an alternative to the Relay and Delay LogicBricks. Instead of having to add one of those on each button whose list of triggers you want to be able to execute via trigger, you can add this one plugin and have the equivalent triggerable action available on every Button and ButtonImage in the scene. This also saves you from having to relocate an existing list of triggers from the Button Trigger to the Relay's trigger panel (and vice versa in case of rollback).
Place this plugin anywhere in the scene, preferably an Empty dedicated to general scene plugins.
The plugin automatically adds the following triggerable parameters to every UIButton and UIButtonImage in the scene under the 'Trigger' Receiver:
- Trigger Now: action which triggers the button click immediately.
- Trigger Delayed: float parameter which triggers the button click after the specified delay in seconds. The timer starts running when you set the parameter to some value. When you set the value, the parameter automatically resets to 0, ready for you to set a greater than 0 delay again later. If you set a new value while the previous delay is still running, the previous delay is cancelled and the new delay starts.
I'm not sure if something similar is needed for other trigger types or UI atoms. At least the UISlider already has a triggerable value setter... But feel free to suggest additional features!
Thanks to @VamEssentials for feedback!