|! IMPORTANT ! This is a PopcornFX v1 page. PopcornFX v2 UE4 plugin documentation can be found here|
(last edit version: v1.0.0-preview-5)
/!\ Please note that this feature is highly experimental, and is subject to change. /!\
Effects can trigger and broadcast Events. Broadcasted events will notify UE4.
In this example, MyCustomEvent will be broadcasted:
Event Listeners allow you to "listen" to specific broadcasted events.
You can globally hook delegates to specific event names. When any particle evolving in the PopcornFXScene broadcasts the desired event, your delegate will be called.
Inside your delegate's scope, you will be able to recover any particle field that was previously registered.
You will need to follow some guidelines to enable this feature.
- Register Event Listener and Unregister Event Listener are the two functions that you will have to use. Once the event listener is registered, your delegate will be called each time any event that has a matching name is broadcasted.
- The PopcornFXScene has a global array of Field Listeners that you need to setup. You add in this array the list of fields that you would like to access when an event delegate is called.
- If the Field Listeners are correctly setup in the PopcornFXScene, you can get their value by using Get Particle Field.