• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

Can I get somebody to check this trigger please?

Status
Not open for further replies.
Level 2
Joined
Mar 13, 2008
Messages
24
I've been trying for a few days now, and I can't get this to work. What it's supposed to do is cast storm bolt on the target (works) wand of illusion on the caster (works) blink the caster to the target (works sometimes) and have a 50% chance to swap positions of the caster and the illusion (doesn't work)

Here's the trigger...

  • Muddling Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Muddling Strike
    • Actions
      • Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Region - Center Venci Illusions <gen> on (Position of (Casting unit))
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Hero - Create Illusion Stick Venci and give it to (Last created unit)
      • Hero - Order (Last created unit) to use (Last created item) on (Casting unit)
      • Wait 0.20 seconds
      • Unit - Move (Casting unit) instantly to (Position of (Target unit of ability being cast))
      • Wait 0.01 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 10) Less than 6
        • Then - Actions
          • Unit Group - Pick every unit in (Units in Venci Illusions <gen> matching ((((Triggering unit) is an illusion) Equal to True) and ((Unit-type of (Triggering unit)) Equal to Satyr Mercinary))) and do (Set IllusionPos = (Position of (Matching unit)))
          • Set VenciPos = (Position of (Casting unit))
          • Unit - Move (Casting unit) instantly to IllusionPos
          • Unit Group - Pick every unit in (Units in Venci Illusions <gen> matching ((((Triggering unit) is an illusion) Equal to True) and ((Unit-type of (Triggering unit)) Equal to Satyr Mercinary))) and do (Unit - Move (Matching unit) instantly to VenciPos)
          • Wait 0.01 seconds
          • Custom script: call RemoveLocation(udg_IllusionPos)
          • Custom script: call RemoveLocation(udg_VenciPos)
        • Else - Actions
          • Do nothing
Did I do something incredibly wrong? Anything helps...
 
Level 8
Joined
Nov 9, 2008
Messages
502
It has probably got something to do with the region you are using. //--False
There really isn't need to use it anyway if you save the location of the illusion when it is created. I have a feeling that the image will be the last created unit.
Also, picking units and doing actions actualy created a unit group, which leaks if not cleared.

Bah, you are using 'triggering unit' when you are filtering the group.
Use instead '((((Matching unit) is an illusion)... e.t.c.'

And lol why you put a 0.01 second wait before you call the leak cleaners....
 
Last edited:
Level 2
Joined
Mar 13, 2008
Messages
24
I wasn't sure if the illusion counted as the last created unit, so I didn't want to use it until I knew for sure. And thank you for pointing out the unit group leak. I forgot about that one.

As for the 0.01 second delay, it's mostly habit. The person I learned GUI from used them between every action, so I picked it up from him. I figure it can't hurt except in certain situations anyway, right?

I'm gonna have to test this when I get up... I'll keep you posted.
 
Level 8
Joined
Nov 9, 2008
Messages
502
There really is no need for waits like that and they will do more harm than good.

As for putting them between every action.......... O.O
Why?
 
Status
Not open for further replies.
Top