1
\$\begingroup\$

I have some NPCS protecting a treasure room in a friendly building. But if the player comes close they turn hostile. I don't know if the NPCS should attack everyone when triggered or only attack the player that triggered them. The latter seems good but if another player could sneak behind the guards whilst they attack someone else and succeed in an easy victory. How should I tackle this issue. If I use the former a random person who didn't do anything but is peacefully looking at the situation could get attacked which isn't RP-Friendly.

By adding more NPCS it kills a main attacker faster however doesn't solve the latter.

By adding more NPCS in the room would cause problems as it is smaller than a cubicle because of the design of the room being centred on the middle but making it larger it loses it's attention.

By simply removing the guards but adding another room before the treasure room, where the guards are. This is ok to stop the first issue because not many players will enter but it will lose the curiosity of guards guarding a door but rather another door.

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

In many MMOs the target selection of mobs is governed by a mechanic nicknamed aggro management by the players.

Each mob keeps an aggro score for each player. Doing damage to the mob increases that mob's aggro for the attacking player. The mob will always target the player with the highest aggro. When you implement that mechanic, you could add an aggro-bonus to each player based on their current proximity to the location the mob is supposed to protect. That means a mob which is currently fighting player A might switch to player B when B moves much closer to the protected location than A.

\$\endgroup\$
2
\$\begingroup\$

You could create a specific zone, where if a player goes past that zone they become priority one for the guards to attack, so if one player gets attacked and starts running away the guards will chase and attack (for a certain distance) but if another player enters that priority zone the guards immediately change course and attack him. You could make the chasing distance low and the damage the guards do high so that they don't ever go to far from the door but are still a very menacing opponent to try to get by.

Hope this helps :)

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .