• 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.

Race aura

Status
Not open for further replies.
Level 3
Joined
Nov 28, 2010
Messages
42
Hello,

I would like to ask how i can create a damage aura that only works for one race.

For Example: +10 Damage for all Orcs.

Thank you for reading this.

Minoros
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Simple. Everyone seems to have trouble to make own auras but the direct way is as straightforward as it gets.

Periodically pick all carrier's of the ability, pick all possible targets around them, put them inside a pickedTargets group. Have another activeTargets group that shall contain the units that are currently buffed. Iterate over activeTargets and distinguish the two cases:

unit is within pickedTargets: Can be left untouched, only remove it from the pickedTargets, so you can see the remaining units.
unit is not in pickedTargets: Unit is no longer the target of the aura, therefore unbuff it -> remove from activeTargets and everything you applied to the unit.

The remaining units are the ones to be freshly buffed -> add them to activeTargets and apply effects.

That's it for the aura framework, alternatively you can use a standard aura and pick units by the standard buff instead of caster+range variant.

For the bonus damage, you can use the passive item ability Item: Bonus Damage.

There is a function to check the race of a unit, too.
 
Level 3
Joined
Nov 28, 2010
Messages
42
Simple. Everyone seems to have trouble to make own auras but the direct way is as straightforward as it gets.

Periodically pick all carrier's of the ability, pick all possible targets around them, put them inside a pickedTargets group. Have another activeTargets group that shall contain the units that are currently buffed. Iterate over activeTargets and distinguish the two cases:

unit is within pickedTargets: Can be left untouched, only remove it from the pickedTargets, so you can see the remaining units.
unit is not in pickedTargets: Unit is no longer the target of the aura, therefore unbuff it -> remove from activeTargets and everything you applied to the unit.

The remaining units are the ones to be freshly buffed -> add them to activeTargets and apply effects.

That's it for the aura framework, alternatively you can use a standard aura and pick units by the standard buff instead of caster+range variant.

For the bonus damage, you can use the passive item ability Item: Bonus Damage.

There is a function to check the race of a unit, too.

Thank you!
 
Status
Not open for further replies.
Top