SphereCommunity
Aggro & taunt - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Aggro & taunt (/Thread-Aggro-taunt)



Aggro & taunt - tleilax - 09-11-2012 05:26 PM

Hello,

I'm trying to implement system mostly used in World of Warcraft and similar games.

When multiple players attack same creature, the creature should be always attacking only the player who did most damage.

So, it works like that. For every hit, the damage is added to threat table, which sums up the damage done by each player.

So, now I need to make a check (which would be done on every hit received on the creature), which would check who has the most damage done (or threat if you like), clear attacker list and focus ALL attacks on this one person.

I'm not sure that ATTACK works like I want it, the creature still doesn't focus properly.

I simply don't want my creatures to switch targets so fast, just to damage everyone a bit, rather than focusing on one the most harmful person.

Anyone can think of any solution for this?