Zombies keep headcrabs attached
Zombies keep their headcrabs attached when they die.
Console command to toggle (starts turned on the first time you play with it):
headcrabs_disable – This will turn the addon on and zombies will keep their headcrabs attached.
headcrabs_enable – This will turn this addon off and headcrabs will drop as normal.
The setting is saved between sessions so you only need to run it once to turn it on or off until you run the command again.
This addon just makes zombies keep their headcrabs attached when they die. The poison zombie will still throw headcrabs, and anything else that creates headcrabs will still work as normal.
Note: The poison zombie will always drop 1 headcrab on death because it is a bit different, that headcrab is already alive and standing on the zombie. I’ll keep trying to find the best way to fix this.
QUESTIONS
—————————–
Q: Can I still spawn headcrabs from the NPC menu?
A: Yes.
Q: How do I turn it off (make everything normal)?
A: Open your console (default key: ~) and enter the command ‘headcrabs_enable’.
Q: How do I turn it back on?
A: Open your console (default key: ~) and enter the command ‘headcrabs_disable’.
Q: How does this work (technically)?
A: The builtin zombies have code in them that detects if the damage they receive was greater than 25% of their health. If that happens then they keep their headcrabs attached. This addon detects when zombies take damage, and if the damage is going to kill them then it increases the amount of damage to trigger the builtin zombie code to keep the headcrab attached.
Q: this adon is dumb why did u maek it
A: Someone was asking for this type of addon so I made it since it was pretty easy. Hopefully they will enjoy it at least.