#how do i check if npc is damaged
28 messages · Page 1 of 1 (latest)
that said you can keep track of the health of all your enemies by having a table of said enemies
ok
and then hooking to all of the enemies Humanoids HealthChanged event
like is there a way to if health has changed
yeah but you want to have like a demoralization system
aight thanks mate
so you need all your enemies health
yes i want to give NPCs the reason to give up
so you'll need to make a bit of math, get the average health of all enemies
and what not
and if the average health of all enemies passes a threshold
make em surrender
unless it's per enemy
not all enemies
ye not all enemies
if it's per enemy then it's simpler
civilians included
just hook the enemy humanoid healthchanged event and if the health is <= some number
make it surrender
that's pretty much it
aight
^ assuming you have a way for that to happen, but you would call your surrender routine there
thanks bav
noo worries
dont worry i have something for that
anyways