Make My NPC Characters run away on bullet hit

Hi there!
I am working on a game where the player drops objects on unsuspecting enemies on the street below.
The enemies are on a simple AI walk path, they spawn from each side and walk across the firing line of the player before being destroyed once they leave the viewport.

Currently, If an enemy NPC is hit with a bullet, it continues walking, which is what I want.

However, I also want the enemy NPCs to REACT to the bullet hit by increasing their forward speed to a fast running speed, thus leaving the viewport rapidly.

Here is a still frame that shows the gameplay and what Iā€™m trying to do:

I have already created animation state machines for the NPC enemies, Now how do I make them move faster when hit?

Any thoughts appreciated :slight_smile:

1 Like