• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Horrible Lag Issue

Status
Not open for further replies.
Level 2
Joined
May 27, 2006
Messages
16
I am making an AoS and am in the proccess of making heros. My current creation is a necromancer that has two auras, one being Mass Corpse Explosion. MCE causes a dying unit to explode on death damaging nearby units.

The problem is, it causes massive lag issues when I give the dummy unit a timed life. I know it is this, because I removed the line and the lag was removed as well, besides the fact that after a while there are thousands of the dummy units and that itself causes lag, so I _have_ to give them a timed life, obviously, but cant.

This is the code for the spell. Can someone please tell me if they have previous problems with applying timed life or if there's just something wrong in the code?

Code keeps getting messed up look at it throgh this: Clicky
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
it appears that this is bugged beyond all reckoning... i c u used a convert and fixed a few things O.O

anyways, fix these

-you are using GetDyingUnit()... use GetTriggerUnit()

-ForGroup is a JASSers worst nightmare, use a loop with an exitwhen u == null

-You are using GetEnumUnit() outside of any ForGroup

-your ForGroup is leaking O.O

-You are using Globals!

-you have excess brackets

-you are using ==true, which is completely useless

-You are using CreateNUnitsAtLoc... replace this with CreateUnit, and change the values accordingly

-if you do that, then u cant use GetLastCreatedUnit(), you'll have to set u = CreateUnit and use u

-you use UnitDamageTargetBJ as opposed to UnitDamageTarget

-you use != true instead of not

-try a 1 second delay before death on the timer, not 1.5

-with CreateNUnitsAtLoc, you're managing quite a few leaks

-your SFX are probably leaking too, but u removed them from the code

-whats the point of damaging with a dummy, when you can just have the caster damage them? (unless you use respond to damage from source spells)

-you are not using a condition, instead you are using a lame if/then comparison

-you arent cleaning up ANY of your leaks

thats all i could find in 2 or 3 mins...
 
Status
Not open for further replies.
Top