Aids in pushing enemies out of an objective zone for a duration of time
Allows players to plan ahead and block and/or inconvenience enemies moving in a certain direction
Prototyping - 2 days
Final Implementation - 2 weeks
As the current weapon system only allowed 1 projectile to be fired from each weapon, I chose to focus on spawning projectiles at the point of impact instead.
Once the weapon is fired there are two actors to note.
An Incendiary projectile that travels in the air to the point of impact
8 Debris projectiles of radius "x=196 units" each are scattered from the point of impact of the Incendiary projectile.
On impact, the Incendiary projectile is hidden visually but stays alive in in the background.
When the Incendiary projectile hits a surface, the Debris projectiles are scattered with a linear impulse in a predetermined pattern.
The Debris projectiles being physics actors perform physics calculations to find a stable location to land on stable ground (only 1 bounce).
Additionally, each Debris projectile updates the Incendiary projectile when it overlaps with a player (players who are "on fire").
The Incendiary projectile deals 'damage over time' (every frame) to players who are "on fire". This way, every Incendiary Projectile fired in a location does consistent 'damage over time' to players on fire.
Damage over time "x=5s" = 25 dps (0.25 dmg every tick / 0.01 s)
As the Debris projectiles do not deal damage individually, this prevents unfair damage stacking if multiple Debris projectiles happen to land in one spot.