- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
I implemented a system where I use the binary count offs to stack stats like attack speed, spell resistance, and mana. For health and damage though I only use tomes (a tome is added to the hero's inventory which he automatically uses).
I have a simply trigger when I type "-level" it levels up the hero 100 times, including their attributes. This involves the hero receiving about 600 tomes in a second (for damage and health) During that there is some lag, but then it goes away.
But now the lag stays. And if I keep leveling more heroes, the lag gets unbearable.
So clearly something must be leaking? The only things I'm using are
I implemented a system where I use the binary count offs to stack stats like attack speed, spell resistance, and mana. For health and damage though I only use tomes (a tome is added to the hero's inventory which he automatically uses).
I have a simply trigger when I type "-level" it levels up the hero 100 times, including their attributes. This involves the hero receiving about 600 tomes in a second (for damage and health) During that there is some lag, but then it goes away.
But now the lag stays. And if I keep leveling more heroes, the lag gets unbearable.
So clearly something must be leaking? The only things I'm using are
JASS:
call UnitAddAbility [code=jass] and [code=jass] call UnitAddItemById [code=jass]. Do these create things that need to be destroyed? Here is the function that gets called on each level up--I understand calling it a 100 times in a row would cause lag initially, but the lag shouldn't stay forever...
Last edited: