Need help with my GMOD Gamemode.

Hello. I have currently started on a gamemode for Garry’s Mod, and am having trouble with something. I was wondering if there is a way to test if a prop/entity is attacked. As well as if there is a way for zombies (npc) to attack that prop/entity.
The gamemode is a base defense where you build props to defend a beacon. The zombies try to get to that beacon, destroying any props in their way. I don’t necessarily need the zombies to aim for the props, but just attack any that block their direct path.

Thank you, Endus322!

Hey there,
I suggest making a custom zombie for that and simply make it attack the beacon(simple, right?)
I suggest using a NextBot for that purpose.

Also, this hook will be called once an entity takes damage, so this way you can tell if it does or doesn’t take damage:

ENTITY:OnTakeDamage

deleted

:snip:
misunderstood

When I copy the NextBot code, I can change the values and its the wrong model. What is the exact folder in gamemodes that the .lua goes in?

Thank you, Endus322