Orochimaru1993
O
Orochimaru1993
Good Tutorial !
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Maybe in Vampirism Fire units are removed in a different way? I don't know, there are tons of ways to remove a unit and non of them differs much visually.
....and i dont have any revive deat ability< so it will not cause any problems They are not removed on a different way 99% shure....and i dont have any revive deat ability< so it will not cause any problems
![]()
Great...i will remove units and i dont have to worry about triggers with event - unit diesWell, Unit - Remove unit doesn't leak for sure, I was just saying there are reports on that. Then do what you want.
Does this leak?
BASE 1

Events


Unit - A unit Is attacked

Conditions


(Owner of (Attacking unit)) Not equal to (Owner of (Random unit from (Units in Region 001 <gen> matching ((Unit-type of (Matching unit)) Equal to Human Flag(Base Owner)))))


(Owner of (Attacking unit)) Not equal to (Owner of (Random unit from (Units in Region 002 <gen> matching ((Unit-type of (Matching unit)) Equal to Human Flag(Base Owner)))))


(Owner of (Attacking unit)) Not equal to (Owner of (Random unit from (Units in Region 003 <gen> matching ((Unit-type of (Matching unit)) Equal to Human Flag(Base Owner)))))


((Region 001 <gen> contains (Attacked unit)) Equal to True) or (((Region 002 <gen> contains (Attacked unit)) Equal to True) or ((Region 003 <gen> contains (Attacked unit)) Equal to True))

Actions


Unit - Order (Attacking unit) to Stop

Custom script: set bj_wantDestroyGroup = true

Custom script: set bj_wantDestroyGroup = true

Custom script: set bj_wantDestroyGroup = true
BASE 1 Copy

Events


Unit - A unit Is attacked

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Owner of (Attacking unit)) Not equal to (Owner of (Random unit from (Units in Region 001 <gen> matching ((Unit-type of (Matching unit)) Equal to Human Flag(Base Owner)))))




(Owner of (Attacking unit)) Not equal to (Owner of (Random unit from (Units in Region 002 <gen> matching ((Unit-type of (Matching unit)) Equal to Human Flag(Base Owner)))))




(Owner of (Attacking unit)) Not equal to (Owner of (Random unit from (Units in Region 003 <gen> matching ((Unit-type of (Matching unit)) Equal to Human Flag(Base Owner)))))




((Region 001 <gen> contains (Attacked unit)) Equal to True) or (((Region 002 <gen> contains (Attacked unit)) Equal to True) or ((Region 003 <gen> contains (Attacked unit)) Equal to True))



Then - Actions




Unit - Order (Attacking unit) to Stop



Else - Actions


Custom script: set bj_wantDestroyGroup = true


Custom script: set bj_wantDestroyGroup = true


Custom script: set bj_wantDestroyGroup = true
Wouldnt a variable instead of Random Unit stop the leak?
that sucks....i need to do it like this?It has to go before groups are used. And it doesn't stack, so you need another one before the next time you use a group.
,for every group
)that sucks....i need to do it like this?,for every group
(i have 32 triggers 0_o and they will need this...
)
are that leaks really so inportant?Would it work that i make trigger that destroys groups every time units is attacked,i think not...
want to destroy group
-if conditions.....
want to destroy group
-if conditions.....
want to destroy group
-if conditions.....
You would need to do that each time, tough luck
Yeah, leaks are that important, ffs!!! Leaks cleaning is one of the most important things in a map! How would you feel if you make a killer map that has great effects and stuff, but it crashes after 5 minutes every time you try to play the map??
I'll tell you how you'd feel, you would feel like shit.
BASE 1 Copy

Events


Unit - A unit Is attacked

Conditions


((Region 005 <gen> contains (Attacked unit)) Equal to True) or (((Region 006 <gen> contains (Attacked unit)) Equal to True) or ((Region 007 <gen> contains (Attacked unit)) Equal to True))

Actions


Custom script: set bj_wantDestroyGroup = true


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Random unit from (Units owned by (Owner of (Attacking unit)) matching (((((Region 007 <gen> contains (Matching unit)) Equal to True) or ((Region 006 <gen> contains (Matching unit)) Equal to True)) or ((Region 005 <gen> contains (Matching unit)) Equal to Tru Not equal to True



Then - Actions




Unit - Order (Attacking unit) to Stop



Else - Actions

Yeah but i never saw my map lagging when i wasn´t fixing leaks .....
is it better to set the group and after the action destroy it or its the same with "Custom script: set bj_wantDestroyGroup = true"?
if you have "Custom script: set bj_wantDestroyGroup = true" do you need to destroy the group every time iven if it is not changed?
Stop asking questions already![]()
: why do i not see the reputation icon?gle zbilja........because you are not logged in?

( NOOB question BTW...)gle zbilja........
So when i answer i must not klick the "Back" button,damn i have to work so hard( NOOB question BTW...)
Of course it has nothing to do with leKs....Arghh that has nothing to do with leaks.
Wtf croatian?
Wait N Times
Events
Conditions
Actions

Set TEMP_INT = (TEMP_INT + 1)

Wait 0.08 seconds

Animation Play Crazycaster's attack animation

Animation Play Crazytarget's death animation

If (TEMP_INT Less than 45) then do (Run Trigger "Wait N Times") else do (Do nothing)
Init

Evénements


Map initialization

Conditions

Actions


Joueur - Add 1000 to Joueur 1 (Rouge) Or actuel


Joueur - Add 1000 to Joueur 2 (Bleu) Or actuel


Joueur - Add 1000 to Joueur 3 (Cyan) Or actuel


Joueur - Add 1000 to Joueur 4 (Pourpre) Or actuel


Joueur - Add 1000 to Joueur 5 (Jaune) Or actuel


-------- Abilities Variable --------


Set Abilities_Gestion[31] = Earth - Natural Regeneration


Set Abilities_Gestion[33] = Earth - Sarment


Set Abilities_Gestion[34] = Earth - Schockwave


Set Abilities_Gestion[35] = Earth - Thrilling Venom


Set Abilities_Gestion[38] = Earth - VenomWave (Neutre hostile)


Set Abilities_Gestion[39] = Earth - Worm's Venom, Venom of Worms


-------- Passives Variables --------


Set Abilities_Gestion[210] = Dummy-Venom


Set Abilities_Gestion[310] = Earth - Venom


Set Abilities_Gestion[211] = Dummy-Pulverisation


Set Abilities_Gestion[311] = Earth - Pulverisation


Set Abilities_Gestion[212] = Dummy-VenomLash


Set Abilities_Gestion[312] = Earth - VenomLash


-------- Locations --------


Set Locations_Important[1] = (Position of Gate of Souls 0009 <gen>)


Set Locations_Important[5] = (Center of SpamCreepsAlliance <gen>)


-------- Experience Cost --------


Set Experienc_Cost[1] = 5


Set Experienc_Cost[2] = 10


Set Experienc_Cost[3] = 17


Set Experienc_Cost[4] = 25


Set Experienc_Cost[5] = 35


Set Experienc_Cost[6] = 50


Set Experienc_Cost[7] = 70


Set Experienc_Cost[8] = 93


Set Experienc_Cost[9] = 120


Set Experienc_Cost[10] = 150


Set Experienc_Cost[11] = 185


Set Experienc_Cost[12] = 226


Set Experienc_Cost[13] = 273


Set Experienc_Cost[14] = 330


Set Experienc_Cost[15] = 400


Set Experienc_Cost[16] = 485


Set Experienc_Cost[17] = 596


Set Experienc_Cost[18] = 755


Set Experienc_Cost[19] = 945


Set Experienc_Cost[20] = 1167
Start Spam CreepsAlliance

Evénements


Temps - Elapsed game time is 30.00 seconds

Conditions

Actions


Unité - Create 1 Troll Headhunter for Joueur 10 (Bleu clair) at Locations_Important[5] facing 160.00 degrees


Héros - Learn skill for (Last created unit): Damnit, i am using all of my axes (Troll Headhunter)


Set IA_Unit_Hero[1] = (Last created unit)


Unité - Create 4 Troll for Joueur 10 (Bleu clair) at Locations_Important[5] facing 90.00 degrees


Unité - Create 1 Berzerker Troll for Joueur 10 (Bleu clair) at Locations_Important[5] facing 90.00 degrees


Groupe unité - Pick every unit in (Units in SpamCreepsAlliance <gen>) and do (Actions)



Boucle - Actions




Unité - Order (Picked unit) to Attaquer-Avancer vers Locations_Important[1]




Groupe unité - Remove all units from (Last created unit group)


Wait 60.00 seconds


Unité - Create 1 Furblog King for Joueur 10 (Bleu clair) at Locations_Important[5] facing 160.00 degrees


Héros - Learn skill for (Last created unit): Stomp (Furblog King)


Set IA_Unit_Hero[2] = (Last created unit)


Unité - Create 2 Furbolg for Joueur 10 (Bleu clair) at Locations_Important[5] facing 90.00 degrees


Unité - Create 1 Chaman Furbolg for Joueur 10 (Bleu clair) at Locations_Important[5] facing 90.00 degrees


Groupe unité - Pick every unit in (Units in SpamCreepsAlliance <gen>) and do (Actions)



Boucle - Actions




Unité - Order (Picked unit) to Attaquer-Avancer vers Locations_Important[1]




Groupe unité - Remove all units from (Last created unit group)


Déclencheur - Turn off (This trigger)
ReviveHeroIA of CA

Evénements


Unité - A unit Meurt

Conditions


And - All (Conditions) are true



Conditions




((Dying unit) is Un héros) Egal Ã* TRUE




(Owner of (Dying unit)) Egal Ã* Joueur 10 (Bleu clair)

Actions


Wait 50.00 seconds


Héros - Instantly revive (Dying unit) at Locations_Important[5], Masquer revival graphics


Unité - Move (Reviving Hero) instantly to Locations_Important[5]


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



Si - Conditions




(Unit-type of (Dying unit)) Egal Ã* Troll Headhunter



Alors - Actions




Unité - Create 4 Troll for Joueur 10 (Bleu clair) at Locations_Important[5] facing 90.00 degrees




Unité - Create 1 Berzerker Troll for Joueur 10 (Bleu clair) at Locations_Important[5] facing 90.00 degrees




Groupe unité - Pick every unit in (Units in SpamCreepsAlliance <gen>) and do (Actions)





Boucle - Actions






Unité - Order (Picked unit) to Attaquer-Avancer vers Locations_Important[1]






Groupe unité - Remove all units from (Last created unit group)



Sinon - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



Si - Conditions




(Unit-type of (Dying unit)) Egal Ã* Furblog King



Alors - Actions




Unité - Create 2 Furbolg for Joueur 10 (Bleu clair) at Locations_Important[5] facing 90.00 degrees




Unité - Create 1 Chaman Furbolg for Joueur 10 (Bleu clair) at Locations_Important[5] facing 90.00 degrees




Groupe unité - Pick every unit in (Units in SpamCreepsAlliance <gen>) and do (Actions)





Boucle - Actions






Unité - Order (Picked unit) to Attaquer-Avancer vers Locations_Important[1]






Groupe unité - Remove all units from (Last created unit group)



Sinon - Actions
Use Spell

Evénements


Temps - Every 1.00 seconds of game time

Conditions

Actions


Set UnitGroup = (Units within 600.00 of (Position of (Triggering unit)) matching ((((Matching unit) is alive) Egal Ã* TRUE) and (((Triggering player) is an enemy of (Owner of (Triggering unit))) Egal Ã* TRUE)))


-------- AoeSpell(Target) --------


-------- TrollHeadhunter --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



Si - Conditions




(IA_Unit_Hero[1] is alive) Egal Ã* TRUE



Alors - Actions




Set Point = (Position of (Random unit from UnitGroupIA_AOEspell))




Set UnitGroupIA_AOEspell = (Units within 250.00 of Point matching ((((Matching unit) is alive) Egal Ã* TRUE) and (((Matching unit) is visible to Joueur 10 (Bleu clair)) Egal Ã* TRUE)))




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





Si - Conditions






(Number of units in UnitGroupIA_AOEspell) Supérieur ou égal Ã* 4





Alors - Actions






Unité - Order IA_Unit_Hero[1] to Artisan neutre - Roquettes Point





Sinon - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





Si - Conditions






Or - Any (Conditions) are true







Conditions








(Number of units in UnitGroup) Supérieur ou égal Ã* 1





Alors - Actions






Unité - Order IA_Unit_Hero[1] to Neutre - Servant des eaux






Unité - Order (Summoned unit) to Attaquer-Avancer vers Locations_Important[1]






Unité - Order IA_Unit_Hero[1] to Prophète Orc - Esprit sauvage






Unité - Order (Summoned unit) to Attaquer-Avancer vers Locations_Important[1]





Sinon - Actions



Sinon - Actions


-------- FurblogKing --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



Si - Conditions




(Triggering unit) Egal Ã* IA_Unit_Hero[2]



Alors - Actions




Set UnitGroupIA_AOEspell = (Units within 325.00 of (Position of IA_Unit_Hero[2]) matching ((((Matching unit) is alive) Egal Ã* TRUE) and (((Owner of (Matching unit)) is an enemy of Joueur 10 (Bleu clair)) Egal Ã* TRUE)))




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





Si - Conditions






(Number of units in UnitGroupIA_AOEspell) Supérieur ou égal Ã* 4





Alors - Actions






Unité - Order IA_Unit_Hero[2] to Roi de la montagne humain - Coup de tonnerre





Sinon - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





Si - Conditions






(Vie of IA_Unit_Hero[2]) Inférieur ou égal Ã* 60.00





Alors - Actions






Unité - Order IA_Unit_Hero[2] to Roi de la montagne humain - Activer avatar





Sinon - Actions



Sinon - Actions
Untitled Trigger 001

Events


Player - Player 1 (Red) types a chat message containing s as An exact match

Conditions

Actions


Set SOUND[1] = LightningBolt1 <gen>


Sound - Play SOUND[1]


Sound - Destroy SOUND[1]

Untitled Trigger 001

Events


Player - Player 1 (Red) types a chat message containing s as An exact match

Conditions

Actions


Set SOUND[1] = LightningBolt1 <gen>


Sound - Play SOUND[1]
Skip Player1

Events


Unit - A unit enters Move1 <gen>

Conditions

Actions


Wait 0.50 seconds


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Number of units in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Control Tower) and ((Owner of (Matching unit)) Equal to Player 1 (Red))))) Equal to 0



Then - Actions




Set Start = (Random point in Start2 <gen>)




Unit - Move (Triggering unit) instantly to Start




Custom script: call RemoveLocation(udg_Start)



Else - Actions
I think you need to set entering unit with a variable when you use waits but you must not change the veriable before 0.5 secdo waits create leak?
im pretty sure this trigger is leaking since it's causing the lag
Skip Player1
Events
Unit - A unit enters Move1 <gen>
Conditions
Actions
Wait 0.50 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Control Tower) and ((Owner of (Matching unit)) Equal to Player 1 (Red))))) Equal to 0
Then - Actions
Set Start = (Random point in Start2 <gen>)
Unit - Move (Triggering unit) instantly to Start
Custom script: call RemoveLocation(udg_Start)
Else - Actions
Skip Player1

Events


Unit - A unit enters Move1 <gen>

Conditions

Actions


Wait 0.50 seconds


Set Creeps = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Control Tower) and ((Owner of (Matching unit)) Equal to Player 1 (Red))))


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Number of units in Creeps) Equal to 0



Then - Actions




Set Start = (Random point in Start2 <gen>)




Unit - Move (Triggering unit) instantly to Start




Custom script: call RemoveLocation(udg_Start)



Else - Actions


Custom script: call DestroyGroup(udg_Creeps)
Movement1

Events


Unit - A unit enters Move1 <gen>

Conditions


(Owner of (Triggering unit)) Equal to Player 11 (Dark Green)

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Custom value of (Triggering unit)) Not equal to 0



Then - Actions




Set End = (Random point in End1 <gen>)




Unit - Order (Triggering unit) to Move To End




Custom script: call RemoveLocation(udg_End)



Else - Actions




Set Start = (Random point in Start2 <gen>)




Unit - Move (Triggering unit) instantly to Start




Custom script: call RemoveLocation(udg_Start)
Speical Effect
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Some Spell
Actions
Set Point = (Position of (Triggering unit))
Special Effect - Create a special effect at Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
onehitkill

Events


Unit - A unit Begins casting an ability


Unit - A unit Is issued an order targeting an object

Conditions

Actions


Set TempLoc[19] = (Position of (Target unit of issued order))


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Triggering unit) is in onehitkill) Equal to True



Then - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






((Target unit of issued order) is in godmode) Equal to False





Then - Actions






Special Effect - Create a special effect at TempLoc[19] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl






Unit - Kill (Target unit of issued order)






Special Effect - Destroy (Last created special effect)





Else - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






((Target unit of ability being cast) is in godmode) Equal to False





Then - Actions






Special Effect - Create a special effect at TempLoc[19] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl






Unit - Kill (Target unit of ability being cast)






Special Effect - Destroy (Last created special effect)





Else - Actions



Else - Actions


Custom script: call RemoveLocation(udg_TempLoc[19])
(Line: 16) (Word: 3) Special Effect Leak
Special Effect - Create a special effect at TempLoc[19] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Special Effect - ^Leak
(Line: 24) (Word: 3) Special Effect Leak
Special Effect - Create a special effect at TempLoc[19] using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
Special Effect - ^Leak
Scan Complete
Location leaks: 0
Special Effect leaks: 2
Lightning leaks: 0
Unit Group leaks: 0
Player Group leaks: 0
Variables
TempLoc[19] : (Line: 7) Location - Removed: Yes
Summary
Total Leaks: 2
Unremoved Variables: 0
Scan duration: 0 seconds
Total Lines Scanned: 30
Total Words Scanned: 189
MS

Events


Player - Player 1 (Red) types a chat message containing -ms as An exact match


Player - Player 2 (Blue) types a chat message containing -ms as An exact match


Player - Player 3 (Teal) types a chat message containing -ms as An exact match


Player - Player 4 (Purple) types a chat message containing -ms as An exact match


Player - Player 5 (Yellow) types a chat message containing -ms as An exact match


Player - Player 6 (Orange) types a chat message containing -ms as An exact match


Player - Player 7 (Green) types a chat message containing -ms as An exact match


Player - Player 8 (Pink) types a chat message containing -ms as An exact match


Player - Player 9 (Gray) types a chat message containing -ms as An exact match


Player - Player 10 (Light Blue) types a chat message containing -ms as An exact match

Conditions

Actions


Set TempGroup[6] = (Units owned by (Triggering player))


Unit Group - Pick every unit in TempGroup[6] and do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






((Picked unit) is A Hero) Equal to True





Then - Actions






Set MSHero[(Player number of (Triggering player))] = (Picked unit)






Set TempPGroup[2] = (Player group((Triggering player)))






Game - Display to TempPGroup[2] the text: (String((Current movement speed of MSHero[(Player number of (Triggering player))])))





Else - Actions


Custom script: call DestroyGroup(udg_TempGroup[6])


Custom script: call DestroyForce(udg_TempPGroup[2])
MS

Events


Player - Player 1 (Red) types a chat message containing -ms as An exact match


Player - Player 2 (Blue) types a chat message containing -ms as An exact match


Player - Player 3 (Teal) types a chat message containing -ms as An exact match


Player - Player 4 (Purple) types a chat message containing -ms as An exact match


Player - Player 5 (Yellow) types a chat message containing -ms as An exact match


Player - Player 6 (Orange) types a chat message containing -ms as An exact match


Player - Player 7 (Green) types a chat message containing -ms as An exact match


Player - Player 8 (Pink) types a chat message containing -ms as An exact match


Player - Player 9 (Gray) types a chat message containing -ms as An exact match


Player - Player 10 (Light Blue) types a chat message containing -ms as An exact match

Conditions

Actions


Set TempPGroup[2] = (Player group((Triggering player)))


Set TempGroup[6] = (Units owned by (Triggering player))


Unit Group - Pick every unit in TempGroup[6] and do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






((Picked unit) is A Hero) Equal to True





Then - Actions






Set MSHero[(Player number of (Triggering player))] = (Picked unit)






Game - Display to TempPGroup[2] the text: (String((Current movement speed of MSHero[(Player number of (Triggering player))])))





Else - Actions


Custom script: call DestroyGroup(udg_TempGroup[6])


Custom script: call DestroyForce(udg_TempPGroup[2])
(Line: 15) (Word: 3) Player Group Leak
Set TempPGroup[2] = (Player group((Triggering player)))
Set TempPGroup[2] = ^Leak
Scan Complete
Location leaks: 0
Special Effect leaks: 0
Lightning leaks: 0
Unit Group leaks: 0
Player Group leaks: 1
Variables
TempGroup[6] : (Line: 16) Unit Group - Removed: Yes
Summary
Total Leaks: 1
Unremoved Variables: 0
Scan duration: 0 seconds
Total Lines Scanned: 28
Total Words Scanned: 246
Fixing Memory Leaks: http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=27219
actually leak checker is correct
you are leaking here Player group((Triggering player)
that function creates a player group from triggering player and you store the player group created into a variable, but then you destroy the variable but not the first player group created... instead of that you should do it this way
add triggering player to TempPGroup[2]
and then you can destroy it safely![]()
function GetForceOfPlayer takes player whichPlayer returns force
local force f = CreateForce()
call ForceAddPlayer(f, whichPlayer)
return f
endfunction
the jass function for this "(Player group((Triggering player)))" isnt creating a player group?
something like this
JASS:function GetForceOfPlayer takes player whichPlayer returns force local force f = CreateForce() call ForceAddPlayer(f, whichPlayer) return f endfunction

function GetForceOfPlayer takes player whichPlayer returns force
local force f = CreateForce()
call ForceAddPlayer(f, whichPlayer)
return f
endfunction
Set TempPGroup[2] = (Player group((Triggering player)))
Custom script: call DestroyForce(udg_TempPGroup[2])
