The spell creates a Time Bomb in your inventory Which you can then click on to arm, which gives it a 10 second timer, which counts down and explodes at the end of the timer.
What I want to to have it have 3 levels of dmg, 300, 450, and 600, reduce the timer to 5 seconds. Then, instead of having it create it in your inventory, I'd like it to create it on the ground invisible, and give the casting hero the option to arm it at any time. Also, A detonated mine should detonate all unarmed bombs in proximity, allowing for some cool chain reaction and domino effects.
Also... what is GUI and where do I learn it? This is the only spell I've been able to create so far, very simple I imagine:
function Trig_Flashfreeze_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A001' ) ) then
return false
endif
return true
endfunction
function Trig_Flashfreeze_Func028002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Flashfreeze_Func039002 takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Flashfreeze_Actions takes nothing returns nothing
set udg_CenterFreeze = GetUnitLoc(GetTriggerUnit())
set udg_FreezePoint[15] = PolarProjectionBJ(udg_CenterFreeze, 100.00, 45.00)
set udg_FreezePoint[1] = PolarProjectionBJ(udg_CenterFreeze, 100.00, 90.00)
set udg_FreezePoint[2] = PolarProjectionBJ(udg_CenterFreeze, 100.00, 135.00)
set udg_FreezePoint[3] = PolarProjectionBJ(udg_CenterFreeze, 100.00, 180.00)
set udg_FreezePoint[4] = PolarProjectionBJ(udg_CenterFreeze, 100.00, 225.00)
set udg_FreezePoint[5] = PolarProjectionBJ(udg_CenterFreeze, 100.00, 270.00)
set udg_FreezePoint[6] = PolarProjectionBJ(udg_CenterFreeze, 100.00, 315.00)
set udg_FreezePoint[7] = PolarProjectionBJ(udg_CenterFreeze, 100.00, 360.00)
set udg_FreezePoint[16] = PolarProjectionBJ(udg_CenterFreeze, 250.00, 45.00)
set udg_FreezePoint[8] = PolarProjectionBJ(udg_CenterFreeze, 250.00, 90.00)
set udg_FreezePoint[9] = PolarProjectionBJ(udg_CenterFreeze, 250.00, 135.00)
set udg_FreezePoint[10] = PolarProjectionBJ(udg_CenterFreeze, 250.00, 180.00)
set udg_FreezePoint[11] = PolarProjectionBJ(udg_CenterFreeze, 250.00, 225.00)
set udg_FreezePoint[12] = PolarProjectionBJ(udg_CenterFreeze, 250.00, 270.00)
set udg_FreezePoint[13] = PolarProjectionBJ(udg_CenterFreeze, 250.00, 315.00)
set udg_FreezePoint[14] = PolarProjectionBJ(udg_CenterFreeze, 250.00, 360.00)
call TriggerSleepAction( 0.20 )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[1], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[2], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[3], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[4], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[5], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[6], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[7], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[15], bj_UNIT_FACING )
call TriggerSleepAction( 0.20 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'h004'), function Trig_Flashfreeze_Func028002 )
call TriggerSleepAction( 0.20 )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[8], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[9], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[10], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[11], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[12], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[13], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[14], bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h004', GetTriggerPlayer(), udg_FreezePoint[16], bj_UNIT_FACING )
call TriggerSleepAction( 0.20 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(), 'h004'), function Trig_Flashfreeze_Func039002 )
call TriggerSleepAction( 0.20 )
call RemoveLocation (udg_FreezePoint[1])
call RemoveLocation (udg_FreezePoint[2])
call RemoveLocation (udg_FreezePoint[3])
call RemoveLocation (udg_FreezePoint[4])
call RemoveLocation (udg_FreezePoint[5])
call RemoveLocation (udg_FreezePoint[6])
call RemoveLocation (udg_FreezePoint[7])
call RemoveLocation (udg_FreezePoint[8])
call RemoveLocation (udg_FreezePoint[9])
call RemoveLocation (udg_FreezePoint[10])
call RemoveLocation (udg_FreezePoint[11])
call RemoveLocation (udg_FreezePoint[12])
call RemoveLocation (udg_FreezePoint[13])
call RemoveLocation (udg_FreezePoint[14])
call RemoveLocation (udg_CenterFreeze)
endfunction
//===========================================================================
function InitTrig_Flashfreeze takes nothing returns nothing
set gg_trg_Flashfreeze = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Flashfreeze, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Flashfreeze, Condition( function Trig_Flashfreeze_Conditions ) )
call TriggerAddAction( gg_trg_Flashfreeze, function Trig_Flashfreeze_Actions )
endfunction
I converted it to custom text because I don't how to copy the triggers like I've seen around here, but if you see any leaks, or can also explain to me what leaks are, that'd be great