HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Do you units always cause leaks??

11-15-2004, 08:33 PM#1
tekkvicious
Whenever a unit is created, they seem to cuases leaks, wether your remove them or not when they die, like what is the deal with this?
11-15-2004, 10:22 PM#2
HEZZA
Define: leeks

if leeks means lag, its prolly because ur creating too many at once. OR overloading ur poor map with them
11-15-2004, 10:37 PM#3
Vilkacis
Your probly trying to create like 200 units at 4 diffrent spots in 1 second....


no...

Dont...ever...do...this

Or youll have another wintermaul lagfest on your hands....

Instead do something like create 2 units every .2 seconds at a region. Doing it in intervals causes less lag, just as i did in my Defense of Silvermoon map...If you dont understand i will post an example...
11-15-2004, 11:06 PM#4
WeAllLoveHim
Quote:
Originally Posted by tekkvicious
Whenever a unit is created, they seem to cuases leaks, wether your remove them or not when they die, like what is the deal with this?

The unit doesn't leak, but the point that you create it at does. Make sure you destroy it.
11-15-2004, 11:08 PM#5
tekkvicious
Quote:
Originally Posted by Vilkacis
Your probly trying to create like 200 units at 4 diffrent spots in 1 second....


no...

Dont...ever...do...this

Or youll have another wintermaul lagfest on your hands....

Instead do something like create 2 units every .2 seconds at a region. Doing it in intervals causes less lag, just as i did in my Defense of Silvermoon map...If you dont understand i will post an example...


no, im not doing that.. this is what im doing, i have custom skill the creates 4-8 units when its cast.

like this.
dloop and dstakcout are intgers
dcastplayer is a player
dscastpos = thelocation of the casting(dcastunit) unit.
loop
exitwhen dloopindex >= dsatkcount
set dsatkunit[dloopindex]=CreateUnitAtLoc( dscastplayer, 'h00G', dscastpos, GetRandomDirectionDeg() )
set dloopindex = dloopindex + 1
endloop
call removelocation(dcastpos)

then...............................at the end of the ability


loop
exitwhen dloopindex >= dsatkcount
call killunit ( dsatkunit[dloopindex])
call removeunit ( dsatkunit[dloopindex])
set dloopindex = dloopindex + 1
endloop
set dcastplayer=null
set dcastunit=null
11-15-2004, 11:09 PM#6
Vilkacis
?!....


Sorry me not know jass...
11-16-2004, 07:22 PM#7
iNfraNe
Things usually cause lag when created for the first time. Esspecially when u create alot at the same time. Try creating 1 of that unit type on 0.01 time and then removing it. It will prolly bring down your lag on creating the units.