B
Beider
Guest
Code:
function Trig_Deadly_Fire_Star_Effect_Actions takes nothing returns nothing
local location LocalPointVariable=udg_PointVar
local effect LocalTempEffect
call TriggerSleepAction( GetRandomReal(0, 3.00) )
// wait random delay (another trigger is another thread)
call AddSpecialEffectLocBJ( LocalPointVariable, "Abilities\\Spells\\Human\\FlameStrike\\FlameStrikeEmbers.mdl" )
set LocalTempEffect = GetLastCreatedEffectBJ()
call TriggerSleepAction( 10.00 )
call RemoveLocation( LocalPointVariable )
call DestroyEffect( LocalTempEffect )
// Remove the point so it doesn't leak
set LocalPointVariable = null
set LocalTempEffect = null
// Local variables leak if you don't set them to null
endfunction
//===========================================================================
function InitTrig_Deadly_Fire_Star_Effect takes nothing returns nothing
set gg_trg_Deadly_Fire_Star_Effect = CreateTrigger( )
call TriggerAddAction( gg_trg_Deadly_Fire_Star_Effect, function Trig_Deadly_Fire_Star_Effect_Actions )
endfunction
I read that using native functions instead of BJ functions is faster. I tried to convert it to use natives instead of the two BJ functions it uses now but I had no luck with it. The problem is when I make my effect everyone in the game DC even if they can't see it, but it single it works fine. (It creates 65 effects in less than 5 sec ^^) I was hoping converting to native functions might help.