I started looking into this when I found myself in the need of using a particle to trigger an event on an object it collided with. I found that using Event Generator on the particle system was the way to go, as this allows you to make each particle trigger an event with a given name after the collision happens, but when I started to investigate how to create this event on the receiving object, I started to have problems and am now hitting a wall basically.
According to the documentation of the Event Generator, the Particle Event Send To Game field is supossed to contain the name of the event that will be triggered on the receiving object (meaning on the object that was hit by the particle), and according to the description of the field: “Requires your game to implement new subclasses of ParticleModuleEventSendToGame representing the types of game events particle events should be able to trigger.”. This information is really vague and wasn’t really helpful.
I’ve tried to find a reference to ParticleModuleEventSendToGame from code, and I’ve found #define directives that contain that name, but no class to subclass from. I’ve read this post which tells me that there is indeed a way of achieving this, but I still don’t know how.
I’ve also read this forum post but no luck either, I can’t seem to find a proper source that outlines the steps I need to follow to achieve what I need, and then again, the official documentation on this matter is really vague.
If anyone could post a code sample showing how to subclass from ParticleModuleEventSendToGame and to implement the event that will be called, or just a link to information that may help be get on the right track that would be great!
Thanks!