Info

  • Deprecated addon Deprecated
  • License MIT License
  • Copyright Robert Greenberg. All rights reserved.

Statistics

  • Download count1,044 total downloads
  • Latest download count 1,001 downloads of latest version
  • Average download count1 downloads per day average

Owners

Event Trigger

Note: See release notes below:

This plugin allows a pseudo event system to be utilized in a Construct 3 project. What this means is that you can have an event generated, along with a message to pass along, and you have can one or more events listening for this event and perform different tasks.

This gives you the ability to essentially create a publish and listen structure to create a little better encapsulation in your projects.

To see how to use this, please look at the included sample project. That shows how to have an included event sheet generate an event, but the multiple parent event sheets respond differently to the event. You could also listen for the event in more than one loaded event sheet and perform different actions.

Tips

  1. On an event sheet that is going to listen for an event you must make sure that the listening event sheet is included directly or indirectly to the current layout. This is normal for how triggers work in general.
  2. Capitalization matters, whatever capitalization is used to send an event, the listeners must match to catch the event. Note: I may change this in a future version.

Release Notes

Version 1.3.0

Major rewrite of the internals of this plugin. The plugin is now very performant for larger projects, does not rely on the tick event anymore, and takes advantage of how triggers work to perform very efficiently.

Version 1.2.0

You now have the ability to add multiple items to the message that gets sent and picked up by a handler.

  1. In order to support backward compatibility, the expression LastEventMessage has been deprecated, but if it's your project already it will only return the first message item.
  2. Going foward you will need to use the expression GetEventMessageAt(index), where index is the zero based index of the message item you want to look at.
  3. A new expression called GetEventMessageItemCount has been added to get a count of the number of items in a message.
  4. If you try an access an index that doesn't exist, you will just get an empty string back

The included example has been modified and will only work with this version going forward.