• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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