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

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