Splash Damage Game Tutorial
From Shoot Em Up Kit
Splash damage occurs when a bomb explodes and sends out a shock wave that expands over time, destroying objects in its path, as shown in the screenshots at the end of this tutorial.
First, create a new particle for the splash effect using the Particle Editor .
On the Sprite tab
- Select a sprite for the explosion
On the General tab
- Name the particle
- Set it to Single Shot
- Set the velocity to 0
- Set the Collision property to Emitter
On Keyframe 1
- Set the Duration property to how long the explosion should grow for (in seconds)
- Set the Collision Scale % property to 0
Click the Add button next to Current Keyframe to add a second Keyframe. On Keyframe 2
- Set the Duration to 0
- Set the Collision Scale to the maximum required
Next, go to the Collision tab and set Sphere Radius to the size the explosion should grow to. You can see the collision mesh expand. Adjust the Sphere Radius, the Collision Scale for each of the Keyframes and the Duration for each of the Keyframes to get the required result.
To save the particle effect, go to the Confirm tab and select Done.
Next, return to the Level Editor and create a bullet . Set the Destroyed Particle to the new particle.
Next, create a weapon with the new bullet type. Set it as the player weapon.
The splash damage will occur when the bullet is destroyed.