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

Multiple aoe effects on ground

Status
Not open for further replies.
Level 3
Joined
Sep 1, 2011
Messages
25
I've made a trigger to my map where a boss throws a debuff on a random player and after 5 seconds a unit will spawn called Desecration. Any unit that gets close to Desecration takes 1000 damage each second, and so far it works.

Here's the triggers:
  • Prime Matron Desecration
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
      • (Matron_of_the_Dead is alive) Equal to True
    • Actions
      • Game - Display to (All players) for 3.00 seconds the text: |cffff0000Prime Mat...
      • Set Prime_Matron_Desecration_Targe = (Random unit from Heroes)
      • Trigger - Turn on Matron Sisters Floating Text <gen>
      • Floating Text - Create floating text that reads |cffff0000Desecrati... above Prime_Matron_Desecration_Targe with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set Matron_of_Suffering_Text[3] = (Last created floating text)
      • Wait 5.00 seconds
      • Trigger - Turn on Prime Matron Desecration Damage <gen>
      • Unit - Create 1 Desecration for Neutral Passive at (Position of Prime_Matron_Desecration_Targe) facing Default building facing degrees
      • Set Prime_Matron_Desecration = (Last created unit)
      • Floating Text - Destroy Matron_of_Suffering_Text[3]
      • Trigger - Turn off Matron Sisters Floating Text <gen>
  • Prime Matron Desecration Damage
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 200.00 of (Position of Prime_Matron_Desecration)) and do (Actions)
        • Loop - Actions
          • Unit - Cause Matron of Suffering 0042 <gen> to damage (Picked unit), dealing 1000.00 damage of attack type Spells and damage type Normal
The problem is however that this trigger happens every 15 seconds, repeating with a new Desecration spawning. The problem is that the old version of the unit doesn't damage a player unit that gets close, the variable has jumped over to the next unit. I've played around with integers and arrays but none seems to work properly, do you know what kind of variable I can use? I might also add that this trigger will keep going until a wipe, or the boss is dead, so it's infinate how many that can spawn.
 
Last edited by a moderator:
Level 3
Joined
Sep 1, 2011
Messages
25
How do I make each desecration damage the units that gets close?

I've made it work beautiful with this trigger :)

  • Prime Matron Desecration Damage
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Desecration_Group and do (Unit - Cause (Picked unit) to damage circular area after 0.00 seconds of radius 300.00 at (Position of (Picked unit)), dealing 1000.00 damage of attack type Spells and damage type Normal)
      • Custom script: call DestroyGroup(udg_Desecration_Group)
I don't know tho, does this leak?
 
Last edited by a moderator:
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Untitled Trigger 001
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in DesecrationGroup and do (Actions)
        • Loop - Actions
          • Set u = Picked Unit
          • Set p = (Position of u)
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 300.00 of p matching (((Matching unit) belongs to an enemy of (Owner of u))) Equal to True)) and do (Actions)
            • Loop - Actions
              • Unit - Cause u to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
          • Custom script: call RemoveLocation(udg_p)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
For that you'll have to declare Desecration Group into a Unit-Group variable first.

EDIT: Oh well.. Maker was faster :)

@Maker: And where you destroy 'DesecreationGroup'? Shouldn't there be a 'set bj_wantDestroyGroup = true' at the beginning of the actions?
 
Status
Not open for further replies.
Top