• 🏆 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!

Why Does This Return Structures

Status
Not open for further replies.
Level 22
Joined
Jul 25, 2009
Messages
3,091
I'm at a total loss... I've looked at this 20 or more times.

  • Warp Way
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Empyrean Gate
    • Actions
      • Set TempUGroup[1] = (Units within 200.00 of (Target point of ability being cast) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Not equal to True)))
      • Unit Group - Pick every unit in TempUGroup[1] and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Move (Picked unit) instantly to (Position of (Casting unit))
          • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set TempUGroup[2] = (Units in (Playable map area) matching ((Custom value of (Picked unit)) Equal to (Custom value of (Matching unit))))
          • Unit Group - Pick every unit in TempUGroup[2] and do (Actions)
            • Loop - Actions
              • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Move (Picked unit) instantly to (Position of (Casting unit))
              • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
              • Special Effect - Destroy (Last created special effect)
      • Custom script: call DestroyGroup(udg_TempUGroup[1])
      • Custom script: call DestroyGroup(udg_TempUGroup[2])
 
If you clean up leaks, make sure you do it properly. All "Position of XY Unit"s leak a location you need to destroy.

Also, enuming all units in playable map area: is this really what you want?
It's extremely hardware consuming to do that. Why don't you store all your units with the set custom value in a global group and simply loop through that group?
 
Status
Not open for further replies.
Top