How can I have a particle destroy an actor on collision?

Hello, I was working on my game, and I’m making a powerup that when used releases many tiny rockets on the screen. How can I make it so that when the rockets touch the enemy, the enemy is destroyed? The way I have it set up so far is that when the powerup is picked up, it spawns an emitter attached to a certain spot on my character’s blueprint where the missile’s come out from.

Thanks :slight_smile:

Hi. I would be considering not using a particle system but instead a blueprint that spawns multiple missiles or spawning multiple instances of a blueprint with one missile. It will be easier to handle damage, movement (such as heat-seaking) and is just all round more powerful. I am not sure whether it is possible to do what you want with an emitter on its own but if it was me i would try and do it in blueprint. But its just a suggestion.

Hi, thanks for your reply. I already tried doing this, but when the missiles touched the enemies nothing changed. I’m guessing it has something do with the particle collisions?

Use a trigger box, when your “Missile” particles trigger the collision box, destroy the enemies actor.

But the particle itself is what spawns the missiles, it just spawns them all in random directions. How would that trigger collisions? I can’t place a collision box around it like that.

Just in case I haven’t been clear enough:
Imagine having a particle system that spawns sparks everywhere. You have an enemy that you want to be destroyed by the sparks. Is there any way to make it so that UE4 detects the collision between the spark and the enemy, so you can destroy the enemy?

Oh wait, I re-read your comment. That’s sort of what I’m doing, but nothing happens when my missile particles collide with the box. I’ve tried with different particle effects, and nothing. It doesn’t pick up the collision.

You could use particle events to trigger events into blueprints. Read this here https://docs.unrealengine.com/latest/INT/Engine/Rendering/ParticleSystems/Reference/Modules/Event/index.html

EPET_Blueprint is what you are looking for.

Here is another suggestion posted by Hourences in the forums. Tie the collision to a blueprint and have it call OnParticleCollide_Event or use a mesh emitter which might trigger the volume .

Now for the example you stated that a bunch of sparks fly off and each spark damage actors they they touch, that is more specific. I don’t see you doing this with GPU particles as this has no connection to the game thread, but if you use CPU particles with emitter events they work.

Now in 4.6 they just added a new feature to have GPU particles with events, but I don’t know much about it which could negate my GPU statement.

Hopefully that helps

Ah, I see. That’s a bit disappointing to say the least, but thanks a lot for your reply :slight_smile: Any way to suggest something like this?

Alright, now that’s more interesting. Thanks a lot :slight_smile:

sorry, I reposted my corrected answer… =)