- Joined
- Aug 19, 2008
- Messages
- 491
Hey dudes!
Anyone got any tips for preloading a spell?
Currently I'm using these:
Anyone got anything more? I still notice some lags with certain spells
Cookie to dude with helpful function
Anyone got any tips for preloading a spell?
Currently I'm using these:
JASS:
function InitTrig_SomeSpell takes nothing returns nothing
local trigger SomeSpellTrigger = CreateTrigger()
local integer ForLoop = 0
local integer ForLoopEnd = 0
call TriggerRegisterAnyUnitEventBJ( SomeSpellTrigger , EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( SomeSpellTrigger , Condition( function Conditions ) )
call TriggerAddAction( SomeSpellTrigger , function Actions )
//Preload
set ForLoop = 0
set ForLoopEnd = 11
loop
exitwhen ForLoop > ForLoopEnd
set SomeGlobalIntegerArray[ForLoop] = 0.
set ForLoop = ForLoop + 1
endloop
set SomeGlobalInteger = 0
set bj_lastCreatedUnit = CreateUnit( Player( PLAYER_NEUTRAL_PASSIVE ), DUMMY_ID, 0., 0., 0. )
call UnitAddAbility( bj_lastCreatedUnit, spell_id )
call KillUnit( bj_lastCreatedUnit )
endfunction
Anyone got anything more? I still notice some lags with certain spells
Cookie to dude with helpful function