• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Laggy spell {my projectile spell is lagging}

Status
Not open for further replies.
Level 3
Joined
Nov 7, 2006
Messages
36
I've created a projectile spell were the projectile is a unit which is moved forward every 0.01 sec. The spell works perfectly except for one thing, after I've used it a few times it starts to lag a lot. Anyone knows what to do?
 
Level 11
Joined
Oct 20, 2007
Messages
342
http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=27219
the link teach u what is leak. How cause leak and remove leak.

the warcraft frame per sec is 65 frame normally,

so u use 0.01s it will refresh 100 frame per sec, it over.
if use 0.02s it will refresh 50 frame per sec, so 1 sec it got 15 frame that not moving,
0.04 it will refresh 25 frame per sec, so 30 frame per sec will see it not moving,

so u can choose the refresh rate that u want.
 
Level 3
Joined
Nov 7, 2006
Messages
36
Thank you guys! That tutorial realy gave me the answers I was looking for. But how do you write the variable name if it's a variable with array, and the array is "Integer A", for example?
 
Level 11
Joined
Oct 20, 2007
Messages
342
Thank you guys! That tutorial realy gave me the answers I was looking for. But how do you write the variable name if it's a variable with array, and the array is "Integer A", for example?

u ask how to remove leak that contain array??
the answer is udg_variable[GetForLoopIndexA()]
Custom script: call RemoveLocation (udg_point[GetForLoopIndexA()])

if you want learn how to find out the name of variable,
try this way,
create a trigger that contain the variable like
  • Set aaa[(Integer A)] = 0
then convert it to custom text
edit > convert it to custom text

then it converted to jass like
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    set udg_aaa[GetForLoopIndexA()] = 0
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001_Copy takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001_Copy = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001_Copy, function Trig_Untitled_Trigger_001_Actions )
endfunction
then find the code there
( set udg_aaa[GetForLoopIndexA()] = 0 )
 
Status
Not open for further replies.
Top