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
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.
download this http://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...
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?
why dont you check it -.-?But will special effects not disappear and not be shown if they are deleted right after they're created?
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>
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