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

[Trigger] Getting all units in front of unit within attack range?

Status
Not open for further replies.
Level 14
Joined
Jun 13, 2007
Messages
1,432
How can I get all units who are infront of a unit within attack range to get damaged? Basicly what I'm trying to create is that when a hero casts an ability all units in front off him within X range should be damaged for Y damage
 
Level 14
Joined
Jun 13, 2007
Messages
1,432
Shockwave?

Ah well, it may not be an ability.

Edit: For a bit more info

  • Unit Group - Pick every unit in (Units within 100.00 of (Position of Paladin 0000 <gen>) and do (Unit - Cause (Triggering unit) to damage (Triggering unit), dealing 500.00 damage of attack type Hero and damage type Normal)
in this trigger the unit will attack everyone who's around him but I want him to only attack those who are infront off him.
 
Level 13
Joined
Mar 16, 2008
Messages
941
...I'm trying to create is that when a hero casts an ability...
syltman said:
Ah well, it may not be an ability.
syltman said:
the caster's weapon damage.
Could you maybe explain exactly, WHEN the damage occurs and HOW?
If it's on attack, cleave.
If not, don't even think of using the unit's weapon damage, you can't calculate it per trigger. Damage detection would only work for attacks, in the moment they hit. Afterwards the weapon damage could've changed
 
Level 14
Joined
Jun 13, 2007
Messages
1,432
Could you maybe explain exactly, WHEN the damage occurs and HOW?
If it's on attack, cleave.
If not, don't even think of using the unit's weapon damage, you can't calculate it per trigger. Damage detection would only work for attacks, in the moment they hit. Afterwards the weapon damage could've changed

Basicly what it is...

When a unit casts a dummy ability that is only used to trigger the trigger all units in front off the units in range should be damaged for X damage. I managed to come up with something but then it also damaged the attacker so my new question is how I can prevent this:

  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
    • (Ability being cast) Equal to Attack
  • Actions
    • Unit - Create 1 Dummy for Neutral Extra at ((Position of Paladin 0000 <gen>) offset by 100.00 towards (Facing of Paladin 0000 <gen>) degrees) facing Default building facing degrees
    • Set Dummy_Unit = (Last created unit)
    • Unit Group - Pick every unit in (Units within 100.00 of (Position of Dummy_Unit) matching (((Picked unit) belongs to an enemy of Player 1 (Red)) Equal to True)) and do (Unit - Cause Paladin 0000 <gen> to damage (Picked unit), dealing 100.00 damage of attack type Hero and damage type Normal)
    • Unit - Remove Dummy_Unit from the game
I want this to only damage the enemy and not the caster
 
Status
Not open for further replies.
Top