Killing Dummies attached to Trees when they die

Gluttonous

Active Member
Reaction score
1
My spell is based off the Sentinel ability, and a trigger places two dummy units at the tree who autocast essence of blight/spirit touch, healing people who get near. This all works fine, but for the life of me I can't find a way to kill these dummy units when the tree dies.

Here's the most basic form of the code I tried.

Code:
Healing Owl Tree Death
    Events
        Destructible - A destructible within (Entire map) dies
    Conditions
    Actions
        Set DyingTree = (Dying destructible)
        Unit Group - Pick every unit in (Units within 100.00 of (Position of DyingTree) matching ((Unit-type of (Matching unit)) Equal to Owl HP Heal Dummy)) and do (Set DyingOwl = (Picked unit))
        Unit - Remove DyingOwl from the game
        Unit Group - Pick every unit in (Units within 100.00 of (Position of DyingTree) matching ((Unit-type of (Matching unit)) Equal to Owl Mana Heal Dummy)) and do (Set DyingOwl = (Picked unit))
        Unit - Remove DyingOwl from the game

I know "picking every destructible in the entire map" only picks the first 64, but I don't have that many anyway, and even when I set it to only be when one specific tree dies for testing purposes it didn't register. I've also tried triggers that just kill all dummies of these types within the area of effect of Death and Decay and similiar spells that kill trees when they're cast, but to no avail.
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Trigger:
  • Removing Trig
    • Events
      • Destructible - A destructible within (Entire map) dies
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Dying destructible))
      • Set TempGroup = (Units within 100.00 of TempPoint matching ((Unit-type of (Picked unit)) Equal to Owl Unit))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup (udg_TempGroup)
 

TomTTT

New Member
Reaction score
44
What HeX said. Though, I would make at the init the actions
Pick every destructible in Playable map area and do actions:
Trigger:
  • Trigger - Add the event Destructible - (Picked destructible) Dies

And when a destructible enters map, do the same.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top