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

Newbie here, Trigger help.

Level 1
Joined
Dec 23, 2024
Messages
2
Just trying to be pointed in the right direction, Trying to damage ALL UNITS that are not computer controlled when outside of an aura (devotion aura) but then not damage said units when inside the aura.


This is my first time posting here im not even going to bother trying to figure out how to post my current trigger as it does not work lol
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,875
Just trying to be pointed in the right direction, Trying to damage ALL UNITS that are not computer controlled when outside of an aura (devotion aura) but then not damage said units when inside the aura.


This is my first time posting here im not even going to bother trying to figure out how to post my current trigger as it does not work lol
You say "when outside an aura" but does that mean it's a continuous damaging effect or just something you want to happen once at a specific moment in time? Either way, the Actions should remain practically the same.

  • Actions
    • Set Variable UnitGroupVar = (Units in (Playable map area))
    • Unit Group - Pick every unit in UnitGroupVar and do (Actions)
      • Loop - Actions
        • If all conditions are true then do (Actions)
          • If - Conditions
            • ((Picked unit) has buff Devotion Aura) Equal to False
            • ((Owner of (Picked unit)) controller) Not equal to Computer
          • Then - Actions
            • Unit - Cause (Picked unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • Else - Actions
The buff Condition is under the Boolean Comparisons category. The computer Condition is under the Player Controller category. The Actions can all be found using the "Search For Text" feature.

Optionally, you can avoid memory leaks with this additional Custom Script action:
  • Actions
    • Set Variable UnitGroupVar = (Units in (Playable map area))
    • Unit Group - Pick every unit in UnitGroupVar and do (Actions)
      • Loop - Actions
        • If all conditions are true then do (Actions)
          • If - Conditions
            • ((Picked unit) has buff Devotion Aura) Equal to False
            • ((Owner of (Picked unit)) controller) Not equal to Computer
          • Then - Actions
            • Unit - Cause (Picked unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • Else - Actions
    • Custom script: call DestroyGroup( udg_UnitGroupVar )
This isn't necessary but it's good practice for keeping your map performing well.
 
Last edited:
Level 1
Joined
Dec 23, 2024
Messages
2
You say "when outside an aura" but does that mean it's a continuous damaging effect or just something you want to happen once at a specific moment in time? Either way, the Actions should remain practically the same.

  • Actions
    • Set Variable UnitGroupVar = (Units in (Playable map area))
    • Unit Group - Pick every unit in UnitGroupVar and do (Actions)
      • Loop - Actions
        • If all conditions are true then do (Actions)
          • If - Conditions
            • ((Picked unit) has buff Devotion Aura) Equal to False
            • (Owner of (Picked unit) is a Computer) Equal to False
          • Then - Actions
            • Unit - Cause (Picked unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • Else - Actions

Optionally, you can avoid memory leaks with this additional Custom Script:
  • Actions
    • Set Variable UnitGroupVar = (Units in (Playable map area))
    • Unit Group - Pick every unit in UnitGroupVar and do (Actions)
      • Loop - Actions
        • If all conditions are true then do (Actions)
          • If - Conditions
            • ((Picked unit) has buff Devotion Aura) Equal to False
            • (Owner of (Picked unit) is a Computer) Equal to False
          • Then - Actions
            • Unit - Cause (Picked unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • Else - Actions
    • Custom script: call DestroyGroup( udg_UnitGroupVar )
This isn't necessary but it's good practice for keeping your map performing well.

The Conditions are all under the Boolean Comparisons category. The Actions can all be found using the "Search For Text" feature.
What I mean is at all times a unit you control, weather thats the starting unit, trained unit, spawned unit is damaged for X amount of damage when they are not under the protection of devotion aura. when the unit(s) enters the aura the damage stops, when the unit(s) leave the aura the damage starts.

hopefully that is a little more specific
 
Level 30
Joined
Aug 29, 2012
Messages
1,383
Right click on your trigger name next to the blank page and select copy as text, now you can insert it between the "warcraft 3 trigger" option on the forum

1734989646990.png
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,875
What I mean is at all times a unit you control, weather thats the starting unit, trained unit, spawned unit is damaged for X amount of damage when they are not under the protection of devotion aura. when the unit(s) enters the aura the damage stops, when the unit(s) leave the aura the damage starts.

hopefully that is a little more specific
Right, so you mean periodically, like say every 1.00 second:
  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
    • Set Variable UnitGroupVar = (Units in (Playable map area))
    • Unit Group - Pick every unit in UnitGroupVar and do (Actions)
      • Loop - Actions
        • If all conditions are true then do (Actions)
          • If - Conditions
            • ((Picked unit) has buff Devotion Aura) Equal to False
            • ((Owner of (Picked unit)) controller) Not equal to Computer
          • Then - Actions
            • Unit - Cause (Picked unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • Else - Actions
    • Custom script: call DestroyGroup( udg_UnitGroupVar )
 
Top