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.
ah, so, Number of units in "GoodGroup" = 0?
after setting it?
EDIT: it still lags.
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)
then the map is lagging because... (i wanna know. im not argueing stubbornly)
The leaks occur due to a nice blizzard bug
Events

Map initialization
Actions

Set PG[1] = Player group (Player 1)

Set PG[2] = Player group (Player 2)

etc.
Events

...
Actions

Game - Display to PG[2] the text: (String((Current movement speed of MSHero[(Player number of (Triggering player))])))
function GetForceOfPlayer takes player whichPlayer returns force
local force f = CreateForce()
call ForceAddPlayer(f, whichPlayer)
return f
endfunction
They never set the f to null. So it leaks.
I think the optimizer fixes this leaks, but it is always better to move from GUI.
Spell trigger

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Leaking Bottle

Actions


Custom script: local unit udg_proptrig


Custom script: local effect udg_propfire


Set proppkt = (Target point of ability being cast)


Set proptrig = (Triggering unit)


Special Effect - Create a special effect at proppkt using Abilities\Spells\Human\CloudOfFog\CloudOfFog.mdl


Set propfire = (Last created special effect)


Wait 1.00 seconds


Special Effect - Create a special effect at proppkt using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl


Unit - Cause proptrig to damage circular area after 0.00 seconds of radius 100.00 at proppkt, dealing 50.00 damage of attack type Chaos and damage type fire


Special Effect - Destroy propfire


Wait 1.00 seconds


Special Effect - Create a special effect at (proppkt offset by 100.00 towards 0.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl


Special Effect - Create a special effect at (proppkt offset by 100.00 towards 45.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl


Special Effect - Create a special effect at (proppkt offset by 100.00 towards 90.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl


Special Effect - Create a special effect at (proppkt offset by 100.00 towards 135.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl


Special Effect - Create a special effect at (proppkt offset by 100.00 towards 180.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl


Special Effect - Create a special effect at (proppkt offset by 100.00 towards 225.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl


Special Effect - Create a special effect at (proppkt offset by 100.00 towards 270.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl


Special Effect - Create a special effect at (proppkt offset by 100.00 towards 315.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl


Unit - Cause proptrig to damage circular area after 0.00 seconds of radius 200.00 at proppkt, dealing 150.00 damage of attack type Chaos and damage type fire


Custom script: call RemoveLocation(udg_proppkt)
download this https://www.hiveworkshop.com/forums...269/57831d1245119201-things-that-leak-lag.w3x and you will notice that it leaks more than once
You NEVER destroy the special effect. You must destroy it or it will leak...Help me guys...location leaks in my spell, even with "removelocation..."
When I use it one after another then sth breaks with the proppkt variable...any suggestions??
Spell trigger
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Leaking Bottle
Actions
Custom script: local unit udg_proptrig
Custom script: local effect udg_propfire
Set proppkt = (Target point of ability being cast)
Set proptrig = (Triggering unit)
Special Effect - Create a special effect at proppkt using Abilities\Spells\Human\CloudOfFog\CloudOfFog.mdl
Set propfire = (Last created special effect)
Wait 1.00 seconds
Special Effect - Create a special effect at proppkt using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Unit - Cause proptrig to damage circular area after 0.00 seconds of radius 100.00 at proppkt, dealing 50.00 damage of attack type Chaos and damage type fire
Special Effect - Destroy propfire
Wait 1.00 seconds
Special Effect - Create a special effect at (proppkt offset by 100.00 towards 0.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Special Effect - Create a special effect at (proppkt offset by 100.00 towards 45.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Special Effect - Create a special effect at (proppkt offset by 100.00 towards 90.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Special Effect - Create a special effect at (proppkt offset by 100.00 towards 135.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Special Effect - Create a special effect at (proppkt offset by 100.00 towards 180.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Special Effect - Create a special effect at (proppkt offset by 100.00 towards 225.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Special Effect - Create a special effect at (proppkt offset by 100.00 towards 270.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Special Effect - Create a special effect at (proppkt offset by 100.00 towards 315.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Unit - Cause proptrig to damage circular area after 0.00 seconds of radius 200.00 at proppkt, dealing 150.00 damage of attack type Chaos and damage type fire
Custom script: call RemoveLocation(udg_proppkt)
I destroyed only 1 effect, because others just dissapear after aproximatly 10 sec or so...
NetMovement 1

Events


Time - Every 0.02 seconds of game time

Conditions

Actions


Set NETinteger = (NETinteger + 3.00)


Set NETtempposition = (Position of NETtarget)


Unit - Move NETtarget instantly to (NETcaster offset by NETinteger towards NETinteger degrees)


Animation - Change NETtarget flying height to ((Current flying height of NETtarget) + 3.00) at 0.00
This trigger is turned on by another one. DO I have to remove loc in this one or I can do it in the other one? I can't remove NETtempposition here because I need the same value in another trigger.
NetMovement 1
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
Set NETinteger = (NETinteger + 3.00)
Set NETtempposition = (Position of NETtarget)
Unit - Move NETtarget instantly to (NETcaster offset by NETinteger towards NETinteger degrees)
Animation - Change NETtarget flying height to ((Current flying height of NETtarget) + 3.00) at 0.00
So basically, do you have to remove loc in the same trigger you define it or you can remove it somewhere else?
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Floating Text - Destroy (Last created floating text)
map init

Events


Map initialization

Conditions

Actions


Set metanid = 0


For each (Integer A) from 1 to 10, do (Actions)



Loop - Actions




Set proptrig[(Integer A)] = No unit




Custom script: call RemoveLocation(udg_proppkt[GetForLoopIndexA()])
metan init

Events


Jednostka - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal Metan cylinder

Actions


Set metanid = (metanid + 1)


Set proptrig[metanid] = (Triggering unit)


Set proppkt[metanid] = (Target point of ability being cast)


Trigger - Run metan loop <gen> (ignoring conditions)
metan loop

Events

Conditions

Actions


For each (Integer A) from 1 to 10, do (Actions)



Loop - Actions




Set proplvl[(Integer A)] = (Level of Metan cylinder for proptrig[(Integer A)])




Wait 1.00 seconds




Special Effect - Create a special effect at proppkt[(Integer A)] using Abilities\Spells\Human\CloudOfFog\CloudOfFog.mdl




Set prop[(Integer A)] = (Last created special effect)




Wait 1.00 seconds




Special Effect - Create a special effect at proppkt[(Integer A)] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl




Set prop_Kopiuj[(Integer A)] = (Last created special effect)




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





If - Conditions






proplvl[(Integer A)] Equal 1





Than - Actions






Unit - Cause proptrig[(Integer A)] to damage circular area after 0.00 seconds of radius 100.00 at proppkt[(Integer A)], dealing 20.00 damage of attack type Chaos and damage type Fire





Else - Actions






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







If - Conditions








proplvl[(Integer A)] Equal 2







Than - Actions








Unit - Cause proptrig[(Integer A)] to damage circular area after 0.00 seconds of radius 100.00 at proppkt[(Integer A)], dealing 40.00 damage of attack type Chaos and damage type Fire







Else - Actions








Unit - Cause proptrig[(Integer A)] to damage circular area after 0.00 seconds of radius 100.00 at proppkt[(Integer A)], dealing 60.00 damage of attack type Chaos and damage type Fire




Special Effect - Destroy prop[(Integer A)]




Special Effect - Destroy prop_Kopiuj[(Integer A)]




Wait 1.00 seconds




Special Effect - Create a special effect at (proppkt[(Integer A)] offset by 100.00 towards 0.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl




Set prop_Kopiuj_2[(Integer A)] = (Last created special effect)




Special Effect - Create a special effect at (proppkt[(Integer A)] offset by 100.00 towards 45.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl




Set prop_Kopiuj_3[(Integer A)] = (Last created special effect)




Special Effect - Create a special effect at (proppkt[(Integer A)] offset by 100.00 towards 90.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl




Set prop_Kopiuj_4[(Integer A)] = (Last created special effect)




Special Effect - Create a special effect at (proppkt[(Integer A)] offset by 100.00 towards 135.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl




Set prop_Kopiuj_5[(Integer A)] = (Last created special effect)




Special Effect - Create a special effect at (proppkt[(Integer A)] offset by 100.00 towards 180.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl




Set prop_Kopiuj_6[(Integer A)] = (Last created special effect)




Special Effect - Create a special effect at (proppkt[(Integer A)] offset by 100.00 towards 225.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl




Set prop_Kopiuj_7[(Integer A)] = (Last created special effect)




Special Effect - Create a special effect at (proppkt[(Integer A)] offset by 100.00 towards 270.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl




Set prop_Kopiuj_8[(Integer A)] = (Last created special effect)




Special Effect - Create a special effect at (proppkt[(Integer A)] offset by 100.00 towards 315.00 degrees) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl




Set prop_Kopiuj_9[(Integer A)] = (Last created special effect)




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





If - Conditions






proplvl[(Integer A)] Equal 1





Than - Actions






Unit - Cause proptrig[(Integer A)] to damage circular area after 0.00 seconds of radius 200.00 at proppkt[(Integer A)], dealing 30.00 damage of attack type Chaos and damage type Fire





Else - Actions






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







If - Conditions








proplvl[(Integer A)] Equal 2







Than - Actions








Unit - Cause proptrig[(Integer A)] to damage circular area after 0.00 seconds of radius 200.00 at proppkt[(Integer A)], dealing 60.00 damage of attack type Chaos and damage type Fire







Else - Actions








Unit - Cause proptrig[(Integer A)] to damage circular area after 0.00 seconds of radius 200.00 at proppkt[(Integer A)], dealing 90.00 damage of attack type Chaos and damage type Fire




Special Effect - Destroy prop_Kopiuj_2[(Integer A)]




Special Effect - Destroy prop_Kopiuj_3[(Integer A)]




Special Effect - Destroy prop_Kopiuj_4[(Integer A)]




Special Effect - Destroy prop_Kopiuj_5[(Integer A)]




Special Effect - Destroy prop_Kopiuj_6[(Integer A)]




Special Effect - Destroy prop_Kopiuj_7[(Integer A)]




Special Effect - Destroy prop_Kopiuj_8[(Integer A)]




Special Effect - Destroy prop_Kopiuj_9[(Integer A)]




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





If - Conditions






metanid Not equal 0






proptrig[(Integer A)] Not equal No unit





Than - Actions






Custom script: call RemoveLocation(udg_proppkt[udg_metanid])






Set metanid = (metanid - 1)





Else - Actions






Do nothing
why dont you check it -.-?But will special effects not disappear and not be shown if they are deleted right after they're created?
Actions

Set StartPoint = (Center of Meteor <gen>)

Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across Meteor Strike <gen>

Camera - Pan camera for Player 1 (Red) to StartPoint over 2.00 seconds

Custom script: call RemoveLocation(udg_StartPoint)

Unit - Create 1 Meteor Strike for Neutral Passive at StartPoint facing Default building facing degrees

Custom script: call RemoveLocation(udg_StartPoint)

Wait 2.00 seconds

Unit - Remove (Last created unit) from the game

Special Effect - Create a special effect at StartPoint using Abilities\Weapons\FragDriller\FragDriller.mdl

Special Effect - Destroy (Last created special effect)

Wait 3.00 seconds

Destructible - Create a Fire at (StartPoint offset by (50.00, 20.00)) facing (Random angle) with scale 1.00 and variation 0

Custom script: call RemoveLocation(udg_StartPoint)

Wait 0.50 seconds

Unit - Create 1 Red Blood Cell (Unit) for Player 1 (Red) at StartPoint facing Default building facing degrees

Custom script: call RemoveLocation(udg_StartPoint)

Game - Display to (All players) the text: There is a grace pe...

Wait 4.00 seconds

Visibility - Disable (Last created visibility modifier)
Does this Trigger leak? I wasn't sure if I had to use that custom script function for every time or just for the last one. Leak Check says it is alright but this is my first time trying to fix a leak and I wanted to make sure I had it down properly. Thanks!
Actions
Set StartPoint = (Center of Meteor <gen>)
Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across Meteor Strike <gen>
Camera - Pan camera for Player 1 (Red) to StartPoint over 2.00 seconds
Custom script: call RemoveLocation(udg_StartPoint)
Unit - Create 1 Meteor Strike for Neutral Passive at StartPoint facing Default building facing degrees
Custom script: call RemoveLocation(udg_StartPoint)
Wait 2.00 seconds
Unit - Remove (Last created unit) from the game
Special Effect - Create a special effect at StartPoint using Abilities\Weapons\FragDriller\FragDriller.mdl
Special Effect - Destroy (Last created special effect)
Wait 3.00 seconds
Destructible - Create a Fire at (StartPoint offset by (50.00, 20.00)) facing (Random angle) with scale 1.00 and variation 0
Custom script: call RemoveLocation(udg_StartPoint)
Wait 0.50 seconds
Unit - Create 1 Red Blood Cell (Unit) for Player 1 (Red) at StartPoint facing Default building facing degrees
Custom script: call RemoveLocation(udg_StartPoint)
Game - Display to (All players) the text: There is a grace pe...
Wait 4.00 seconds
Visibility - Disable (Last created visibility modifier)
you don´t need to remove location leaks if your position is unit on map - some unit 0023 <gen>
....you don´t have to do that -.- ,its not a function too,and there is an event - unit comes within range of unit for witch is not using remove location or anything like that,besides my map never did´t lag...Just wrong? You have to :O
....you don´t have to do that -.- ,its not a function too,and there is an event - unit comes within range of unit for witch is not using remove location or anything like that,besides my map never did´t lag...
there is also no need to use it in destructible that is already in map (in WE)
So, what do you want to say with this? Since you spoke about a location leak, you're talking about this:you don´t need to remove location leaks if your position is unit on map - some unit 0023 <gen>
Random - Do something at <Position of <Unit 0023<gen>>>
function Foo takes nothing returns nothing
local timer t = NewTimer()
... do some stuff
call ReleaseTimer(t)
//No need for nulling here?
endfunction
you have Position of unit but it is not a function like center of region.....What I'm talking about is, that "Paladin 0000 <gen>" isn't a location but a unit. How du you get its position (a location) without "Position of unit"? I just don't get what you're talking about.
The timer utils thingy is great![]()
that is bullshit everyone is saying that and i know in one map there is more than 1000 units removed and nothing happensIt leaves a small leak
that is bullshit everyone is saying that and i know in one map there is more than 1000 units removed and nothing happens
