Particle explosion when enemy is destroyed
peterraad
Member Posts: 56
I'm having difficulty with an enemy dying when the bullet hits him. The actor is destroyed when the bullet collides with it, BUT when the enemy dies i want the particles to explode outward (which i also need help on doing so) but when the enemy is destroyed the particles dont show up. I need help with configuring the particles to explode outwards when the enemy is destroyed too. THANKS and much appreciated!
Comments
Say you shoot a bullet at a "bad guy" actor....go to your "bullet" actor and create a rule....when overlap or collide with "bad guy"...spawn actor "debris"...copy this so that the collision spawns 3, 4 maybe even 5 debris actors in relation to the actor...not scene.
I use debris spawned from "bullet" so as my bullets hit something...it shoots well..."debris" this works great if your bad guy requires more than one bullet to destroy it....use this same technique to spawn debris from your bad guy as it is destroyed.
So, goto your "debris" or "bulllet" actor and add a move behavior and make the direction random(1,359), speed random(50,200) put in a timer with a destroy behavior say after about .25-.5 seconds after...as well add an interpolate behavior for alpha and size width and size height...interpolate the same time... .25-.50 seconds....works great for me...and Ive tried using particles...heavy on resources...spawn debris acts...works much smoother...for me anyways.
I hope this helps....if you need I can create a small template...free of course....easily copied and pasted to your game...no merging required.
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing
Notice the little blue balls of debris scattered.
Complete Guide to iOS Publishing {} Complete Guide to Mac Publishing