- Joined
- Nov 18, 2007
- Messages
- 1,084
JASS:
function Trig_Thunder_Test_Actions takes nothing returns nothing
local lightning thunder1
local lightning thunder2
local real x
local real y
set x = GetUnitX(udg_Test)
set y = GetUnitX(udg_Test)
call AddLightningEx( "CLPB", true, x, y, 2000.00, x, y, 0.00 )
set thunder1 = GetLastCreatedLightningBJ()
call AddLightningEx( "CLSB", true, x, y, 2000.00, x, y, 0.00 )
set thunder2 = GetLastCreatedLightningBJ()
call AddSpecialEffectTargetUnitBJ( "origin", udg_Test, "Abilities\\Weapons\\Bolt\\BoltImpact.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call PolledWait( 1.00 )
call DestroyLightningBJ(thunder1)
call DestroyLightningBJ(thunder2)
endfunction
//===========================================================================
function InitTrig_Thunder_Test takes nothing returns nothing
set gg_trg_Thunder_Test = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Thunder_Test, Player(0), "-thunder", true )
call TriggerAddAction( gg_trg_Thunder_Test, function Trig_Thunder_Test_Actions )
endfunction
Okay, something's wrong with this, and I'm not sure what it is since I'm new to Jass. The lightning never gets destroyed, but it does get created. Does anyone what's wrong?