[General] Needs help to create a threat system.

Level 11
Joined
Oct 11, 2012
Messages
711
Hey all, I am thinking about creating a threat system like the one in World of Warcraft. For those of you haven't played WOW, threat system means if there are several units attacking an enemy, then the higher damage a unit deals to an enemy the more likely that unit would be the target of the enemy. The amount of the damage is the total damage the unit deals to the enemy, not a single attack. I hope this explanation helps.
I haven't got an idea of how to do it...maybe a DDS system is required.
Thanks in advance.
 
Level 29
Joined
Oct 24, 2012
Messages
6,545
You would need a DDS and Unit indexer by bribe and a real array. Then get the damage done to the unit and update it in the real array. Then you will need some if statements and a loop to check if that unit is getting attacked. If it isn't then reset the integer counter. If it is then check how many units are attacking it ( this part is hard to do). Then you need to decide if you want to order more units to attack it or not.

That is my suggestion for this.
 
Level 11
Joined
Oct 11, 2012
Messages
711
You would need a DDS and Unit indexer by bribe and a real array. Then get the damage done to the unit and update it in the real array. Then you will need some if statements and a loop to check if that unit is getting attacked. If it isn't then reset the integer counter. If it is then check how many units are attacking it ( this part is hard to do). Then you need to decide if you want to order more units to attack it or not.

That is my suggestion for this.

Thanks for the suggestion and I will think about it. +Rep
 
Top