• 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] Can someone please check this for leaks?

Status
Not open for further replies.
Level 15
Joined
Sep 3, 2006
Messages
1,738
  • Mind Cloak
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mind Cloak (C)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Mind Cloak (C) for (Triggering unit)) Equal to 1
        • Then - Actions
          • Set Dummy_Unit = (Target unit of ability being cast)
          • Unit - Hide Dummy_Unit
          • Wait 5.00 seconds
          • Unit - Unhide Dummy_Unit
          • Set Dummy_Unit = No unit
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Mind Cloak (C) for (Triggering unit)) Equal to 2
        • Then - Actions
          • Set Dummy_Unit = (Target unit of ability being cast)
          • Unit - Hide Dummy_Unit
          • Wait 10.00 seconds
          • Unit - Unhide Dummy_Unit
          • Set Dummy_Unit = No unit
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Mind Cloak (C) for (Triggering unit)) Equal to 3
        • Then - Actions
          • Set Dummy_Unit = (Target unit of ability being cast)
          • Unit - Hide Dummy_Unit
          • Wait 15.00 seconds
          • Unit - Unhide Dummy_Unit
          • Set Dummy_Unit = No unit
        • Else - Actions
Basically, you cast the spell and then the unit is removed from existence. Everything works fine, but for some reason people play my map and complain that the unit stays hidden forever. I, on the other hand have never had this experience. Would someone mind telling me if it leaks and if that's the problem?

EDIT: It being non-MUI is not the problem, duplicate heroes in my map don't happen. Also, you can't use it while a unit is hidden.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
It does not leak.
You do not need to
  • Set Dummy_Unit=No Unit
But that is not your problem
A little improvement:
  • Mind Cloak
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mind Cloak (C)
    • Actions
      • Custom script: local unit udg_Dummy_Unit
      • Set Dummy_Unit = (Target unit of ability being cast)
      • Unit - Hide Dummy_Unit
      • Wait (Level of Mind Cloak (C) for (Triggering unit))x5 seconds
      • Unit - Unhide Dummy_Unit
 
Status
Not open for further replies.
Top