How do I subclass from ParticleEventSendToGame?

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!


I have created pull-request to solve this problem:

Any documentation or help on this after a year?

Still haven’t found a way to solve this problem

but in 4.10 and 4.11, there still a bug, plese fix up it.

Wow, I just lost 2 hours looking like a total idiot trying to fix an engine-side problem… Fix… Pretty please?

Hey, I can’t seem to get the diff on that pull request from the link you’ve provided. Care to provide a snippet? Thanks.

Have fixed the URL, dot at the end of sentence appended to URL by link parser.

Thanks a lot!

I’m also interested in this topic and after a few years it’s still hard to find something specific.