Slow Projectile

Author: Josiah Jones

Problem: 
    
    So this week I was making a slow projectile for my enemy to shoot three shots of basic bullets. This slow projectile was supposed to slow the player on hit and last just for a couple of seconds before the player returns back to there original movement speed. But instead what was happening was either the slow effect would stack, speed would end up at 0(when more than one slow projectile hit at the same time), nothing would happen, or the original speed will get lost and become the slow speed.

Solution:
    
    To address the issue, I initially implemented the slow effect in the player blueprint instead of the slow projectile blueprint. I created a delegate in the player blueprint that binds to the slow effect event. In the slow projectile blueprint, I call this delegate when the projectile hits the player, ensuring consistent tracking.
    However, this solution had a limitation when we introduced a power-up that permanently increased the player's movement speed. The original speed retrieval didn't account for this boost, resulting in an incorrect return value after being slowed. to resolve this, I updated the original speed every time a power-up was acquired. i achieved this by capturing the new base speed in the movement speed boost event graph.

Slow Projectile Event Graph:

Notes: Shows old webbed event when everything was done in its event graph. Shows delegate call.

Player Event Graph:


Notes: Shows new web event. Shows delegate binding to event. Shows grabbing the original Speed.

Movement Speed Boost Event Graph:


Notes: Shows updating original speed after increased form powerup. 

Comments

Popular posts from this blog

Procedural Generation - Room NavMesh Spawning

Powerups and Wall clipping