• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Question: is this leaked?

Status
Not open for further replies.
Level 6
Joined
Aug 5, 2015
Messages
202
is this leaked? if leaked, teach me the right things to do :vw_love:

  • shd blink
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Treant Hide
    • Actions
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Add Shadow invi to (Last created unit)
      • Unit - Set level of Shadow invi for (Last created unit) to (Level of Treant Hide for (Casting unit))
      • Unit - Order (Last created unit) to Human Sorceress - Invisibility (Casting unit)
      • Wait 2.00 seconds
      • Unit - Kill (Last created unit)
 

Attachments

  • 1.png
    1.png
    12.9 KB · Views: 108
You should create a variable for the position of casting units since location leaks
after than you destroy the variable.

  • Custom script: call RemoveLocation(udg_loc)
You shouldn't use wait and then kill the dummy unit. You can generate an expiration timer for your dummy unit.

  • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
 
if im not use variable, instead i just use:
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)

its already good for my trigger?

and i dont need trigger: Unit - Kill (Last created unit)
anymore?
 
if im not use variable, instead i just use:
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)

You should use the variable for the location. Locations leak.

Unit - Add a 2.00 second Generic expiration timer to (Last created unit)

its already good for my trigger?

and i dont need trigger: Unit - Kill (Last created unit)
anymore?

Yes you don't need to use it. The expiration timer removes the dummy unit.
 
thanks =) and so here we are

  • treanthide
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Treant Hide
    • Actions
      • Set TreantHidePoint = (Position of (Casting unit))
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at TreantHidePoint facing Default building facing degrees
      • Unit - Add Shadow invi to (Last created unit)
      • Unit - Set level of Shadow invi for (Last created unit) to (Level of Treant Hide for (Casting unit))
      • Unit - Order (Last created unit) to Human Sorceress - Invisibility (Casting unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_TreantHidePoint)
good? ;)
 
okay thanks guys, but i have new trigger
is this right? i want this trigger leakless and remove any units in "any condition"
i worried if the dummy stuck on map, and more stuck can caused fatal error (too many units)

or i must making variable region and making :
Set flaregroup = (Units in (Playable map area))
and the customscript: Custom script: call DestroyGroup( udg_flaregroup )


this is my current trigger:

  • wrathdummy1
    • Events
      • Time - Every 61.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Central explosion
              • (Unit-type of (Picked unit)) Equal to Flare Star Segment.
              • (Unit-type of (Picked unit)) Equal to Flare Summoner
              • (Unit-type of (Picked unit)) Equal to Flare.
              • (Unit-type of (Picked unit)) Equal to invisible Flare.
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
 
this?

  • wrathdummy1
    • Events
      • Time - Every 61.00 seconds of game time
    • Conditions
    • Actions
      • Set flaregroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in flaregroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Picked unit)) Equal to Central explosion
                  • (Unit-type of (Picked unit)) Equal to Flare Star Segment.
                  • (Unit-type of (Picked unit)) Equal to Flare Summoner
                  • (Unit-type of (Picked unit)) Equal to Flare.
                  • (Unit-type of (Picked unit)) Equal to invisible Flare.
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
              • Custom script: call DestroyGroup( udg_flaregroup )
            • Else - Actions
 
:D

  • wrathdummy1
    • Events
      • Time - Every 61.00 seconds of game time
    • Conditions
    • Actions
      • Set flaregroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in flaregroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Picked unit)) Equal to Central explosion
                  • (Unit-type of (Picked unit)) Equal to Flare Star Segment.
                  • (Unit-type of (Picked unit)) Equal to Flare Summoner
                  • (Unit-type of (Picked unit)) Equal to Flare.
                  • (Unit-type of (Picked unit)) Equal to invisible Flare.
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • Custom script: call DestroyGroup( udg_flaregroup )
 
  • wrathdummy1
    • Events
      • Time - Every 61.00 seconds of game time
    • Conditions
    • Actions
      • Set flarepoint = (Playable map area)
      • Set flaregroup = (Units in flarepoint)
      • Unit Group - Pick every unit in flaregroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Picked unit)) Equal to Central explosion
                  • (Unit-type of (Picked unit)) Equal to Flare Star Segment.
                  • (Unit-type of (Picked unit)) Equal to Flare Summoner
                  • (Unit-type of (Picked unit)) Equal to Flare.
                  • (Unit-type of (Picked unit)) Equal to invisible Flare.
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • Custom script: call DestroyGroup( udg_flaregroup )
and this is my trigger of my pick hero after i learn few things about leak here it is

  • hero pick
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Set Wisp = Nephalem Soul
      • Set wisp1 = (Buying unit)
      • Set WispGroup = (Units owned by (Owner of (Sold unit)))
      • Set REGION1 = (Center of Region 001 <gen>)
      • Unit Group - Pick every unit in WispGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Sold unit)) Equal to Paladin
                  • (Unit-type of (Sold unit)) Equal to Cleric
                  • (Unit-type of (Sold unit)) Equal to Berserker
                  • (Unit-type of (Sold unit)) Equal to Void Lord
                  • (Unit-type of (Sold unit)) Equal to Necromancer
                  • (Unit-type of (Sold unit)) Equal to Faceless King
                  • (Unit-type of (Sold unit)) Equal to Magic Walker
                  • (Unit-type of (Sold unit)) Equal to Sky Magician
                  • (Unit-type of (Sold unit)) Equal to Scar Ancient
                  • (Unit-type of (Sold unit)) Equal to Agile Assassin
                  • (Unit-type of (Sold unit)) Equal to Crypt Guardian
            • Then - Actions
              • Unit - Add a 1.00 second Generic expiration timer to wisp1
              • Unit - Move (Sold unit) instantly to REGION1
              • Camera - Pan camera for (Owner of (Sold unit)) to REGION1 over 0.40 seconds
              • Special Effect - Create a special effect at REGION1 using Abilities\Spells\Other\Awaken\Awaken.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
      • Custom script: call RemoveLocation (udg_REGION1)
      • Custom script: call DestroyGroup(udg_WispGroup)
 
thanks, the unit group for add hero to the group for condition

i read sound have leak too
and my trigger:
play - sound
set volume last played sound to 100%
destroy last played sound
then after that my sound doesnt play
so i cant do without being leak?
 
If you created Sound via Trigger and don't need that Sound anymore, then yes your Sound leaks. If you detroyed a sound, you can't play it anymore so don't destroy it, especially Sound Created at Sound Editor. Bottomline is, destroy sounds that you will no longer play.

I said you don't need the unit group because you directly refer to the Sold Unit and not the Picked Unit.
After defining REGION1, your next code should be the If-Condition. Unit group was unnecessary.
 
Status
Not open for further replies.
Back
Top