- Joined
- Jun 10, 2008
- Messages
- 1,399
JASS:
function Trig_Glass_Func002Func002Func005003 takes nothing returns nothing
call KillDestructable( GetEnumDestructable() )
endfunction
function Glass takes location loc returns nothing
local location point = loc
call AddSpecialEffectLocBJ( point, "war3mapImported\\Lasercannon.mdx" )
call TriggerSleepAction(2.00)
call TerrainDeformationCraterBJ( 2.00, true, point, 512, 50.00 )
call SetTerrainTypeBJ( point, 'Nice', -1, 3, 0 )
call EnumDestructablesInCircleBJ( 256, point, function Trig_Glass_Func002Func002Func005003 )
call RemoveLocation(point)
endfunction
function Trig_Glass_Conditions takes nothing returns boolean
if ( GetSpellAbilityId() == 'A00E' ) then
return true
endif
return false
endfunction
function Trig_Glass_Func002C takes nothing returns boolean
if ( GetSpellTargetUnit() == gg_unit_e000_0005 ) then
return true
endif
return false
endfunction
function Trig_Glass_Actions takes nothing returns nothing
local location point
local integer t=GetTerrainTypeBJ(point)
if ( Trig_Glass_Func002C() ) then
set udg_LOOP = 1
if (not(t == 'nice')) then
loop
call Glass(GetRandomLocInRect(gg_rct_Planet_1))
call RemoveLocation(point)
call TriggerSleepAction( GetRandomReal(0.00, 0.50) )
set udg_LOOP = udg_LOOP + 1
endloop
endif
endif
endfunction
//===========================================================================
function InitTrig_Glass takes nothing returns nothing
set gg_trg_Glass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Glass, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Glass, Condition( function Trig_Glass_Conditions ) )
call TriggerAddAction( gg_trg_Glass, function Trig_Glass_Actions )
endfunction
This is my glassing trigger, you basically cast it on a planet, and it creates a whole bunch of explosions and stuff in a rect, but when you cast the ability nothing happens.. help?
PS: i'm medeocre at jass, but i still use jasscraft.
+rep will be given to any good answers..