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

Saving summoned ward to a Variable

Status
Not open for further replies.
Level 9
Joined
Jul 30, 2018
Messages
445
Hey!

This, yet again, may seem a stupid question, but is there way to save a summoned ward (like Healing Ward or Serpent Ward) to Variable for later use? With a typical spell I can save (casting unit) and (target unit of ability being cast) but with Healing Ward and Serpent Ward spells target unit doesn't seem to refer to the summoned Ward. (summoned unit) doesn't work either. So far I've been using a temporary workaround (Random unit from (Units within 600.00 of (Position of (Casting unit)) matching ((Unit-type of (Matching unit)) Equal to Healing Ward))), but this has the problem that if there are multiple Healing Wards, it could pick any of them.

Okay, so now I made a second trigger with event unit entering a region and then I save the entering unit. This seems to work and catch the correct Ward, even if there were already existing Wards. However, is there a way to make this all in one trigger? Seems kinda silly to make two triggers for such a simple thing...
 
Last edited:
There's an event specifically for when a unit is summoned.
  • Summon Ward
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Summoned unit)) Equal to Healing Ward
          • (Unit-type of (Summoned unit)) Equal to Serpent Ward (Level 1)
          • (Unit-type of (Summoned unit)) Equal to Serpent Ward (Level 2)
          • (Unit-type of (Summoned unit)) Equal to Serpent Ward (Level 3)
          • (Unit-type of (Summoned unit)) Equal to Serpent Ward (Level 4)
    • Actions
      • Set Caster = (Summoning unit)
      • Set Ward = (Summoned unit)
 
Status
Not open for further replies.
Top