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