• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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