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

[Trigger] need this spell to work

Status
Not open for further replies.
Level 4
Joined
May 31, 2009
Messages
109
  • Cunning Distraction Cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Cunning Distraction (trigger enhanced)
    • Actions
      • Custom script: local group udg_AOE_LocalCasterGroup
      • Set AOE_CasterGroup = (Units in No region)
      • Set AOE_LocalCasterGroup = (Units in No region)
      • Unit Group - Pick every unit in (Units within SuperAoERadius[(Level of Cunning Distraction (trigger enhanced) for CharacterSwash)] of (Position of CharacterSwash) matching ((Owner of (Picked unit)) Equal to Neutral Hostile)) and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of CharacterSwash)
          • Unit - Create 1 Dummy Unit 1 for (Owner of CharacterSwash) at TempPoint facing Default building facing degrees
          • Custom script: call RemoveLocation( udg_TempPoint )
          • Unit - Hide (Last created unit)
          • Unit - Add Cunning Distraction (dummy) to (Last created unit)
          • Unit - Order (Last created unit) to Undead Dreadlord - Sleep (Picked unit)
          • Unit Group - Add (Last created unit) to AOE_CasterGroup
      • Wait 1.00 seconds
      • Set AOE_LocalCasterGroup = AOE_CasterGroup
      • Unit Group - Pick every unit in AOE_LocalCasterGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
i have tried this skill many times but it still doesnt work:thumbs_down:
 
It's that MUI GUI trick, you fool the system into using the local variable instead of the global one.

I was just wondering... why do you set unit groups to "units in no region"?

Ohh, I always use massive arrays for MUI, if I knew this... :X Thanks ;)

I was wondering about that unit group-thing too, he could fix a leak with those variables, but he doesn't :p
 
Status
Not open for further replies.
Top