One-shot killed enemies do not alert allies

I noticed that whenever I one shot killed enemies they would not alert their allies due to AttackBehaviour() not being called before they died. This would look rather silly if I have a group of 4 tightly packed enemies and one of them just dropped dead in-front of the others without any reaction.

I added the AggravateNearbyAllies() method as a subscriber to the OnDeath Unity event to sort this out.
image

Not sure if anyone else ran into the same issue but thought I’d mention it.

7 Likes

That’s a clever solution. Well done.

I could see situations where a oneshot kill would not alert nearby enemies… but we’re not making WoW Rogues quite yet in our course.

I don’t quite have an attack option where I can one-shot kill an enemy in my project, but I could see doing it in a way that just triggers the others’ “suspicion” behaviour. The rationale would be in the case of an enemy who’s just wounded he would have a notion where the shot came from and alert his friends to follow him. Whereas in the one-shot case he would drop dead which the others would notice but they wouldn’t have an idea on which direction the player shot from to run towards him.

One could also think that if a patroling guard came across the body of one of his friends he should be able to detect it and get alerted. Which might be a state in between “aggravated” and “suspicious”, basically a “suspicious” but also calling out to other enemies for assistance…

For a good laugh, check out this video, especially at the 6:00 mark where the archer is trying to get past a slew of very video game guards.

Oh wait, it’s “for the peace and the kingdom”, not “for a piece of the kingdom” :laughing:

They’ve got another video of two guards in a bar who can only see what is RIGHT in front of them as a thief sneaks in and commits crimes. The poor Garlic Farmer keeps trying to get their attention, but the guards are stuck on stupid.

Privacy & Terms