• 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:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You've used: "(Owner of (Picked unit)) Equal to Neutral Hostile)" to set up the unit group
which should be: "(Owner of (Matching unit)) Equal to Neutral Hostile)"

Just a little question: why the custom script? You set up a local variable that is actually a global one? :confused:

Remove the unit group leaks, by the way...
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
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