Snake Parasite
The Snake Parasite is one of the most common enemies in the game along with the wolves. The mechanic behind the snake parasite is that it will hide in corpses strewn throughout the level once it see's the player, controlling their movements and using different attacks based on which type of corpse it is. When the corpse is defeated, the Snake will leave and search for a new host to use until it runs out of bodies or is killed. In addition, whenever the host attacks, the Snake will pop it's head out, allowing the player to kill the Snake from within.
The Behavior Tree
If the player is completely undetected by the player, it will roam around.
If the player has been seen or heard, the Snake will immediately attempt to find a host to take over. If if can't it will fight the player.
If it must fight the player, it will first use it's acid spit from range. After which it will check if it can reach the player, and will then attempt a bite attack if it can. If it can't it will move to cover until it can use it's acid spit again, or scatter from the player.
Mechanics
Acid Spit
Design: This attack serves as a ranged attack for the very fragile Snake Parasite who doesn't want to be at close range all the time. It also doubles up as a lingering AOE, forcing the player to reconsider their positioning which could leave them open to other attacks.
Damage: 35
Frequency: Often
Speed: N/A
Code:
The Parasite plays an animation, and on notify creates an acid spit projectile.
It then sets the damage on the projectile, and then enables the physics on it.
Snake Bite
Design: To keep the Snake Parasite from simply just spamming acid pools, a bite was implemented to give it some gameplay variety when it's forced to fight. It also allows the Snake to pull off hit and runs, creating dynamic gameplay situations where the player must scramble away from the Snake and try to shoot it down.
Damage: 20
Frequency: High
Speed: 300 units per second
Code:
The Blackboard Task sets the movement speed and then has the Snake move towards the player.
Once it reaches the player it activates the Bite event which plays an animation and attaches a damaging hitbox to the snake's mouth.