• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Needs help to create a threat system.

Status
Not open for further replies.
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.
 
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
 
Status
Not open for further replies.
Top