- Joined
- Oct 14, 2008
- Messages
- 26
Glacier
i want to make any unit around the ice freezed and take damage each second (spell based on etangle roots). Please fix it for me ^O^
JASS:
//============================================================================//
// TRIGGER INSTALLATION INSTRUCTION //
//============================================================================//
//Copy and paste all scripts, dummy, and ability, into your maps, and gives //
//credits for my work. //
//============================================================================//
//The_Dead_Fight //
//============================================================================//
function Trig_Glacier_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
//function Trig_Glacier_Func001A takes nothing returns nothing
//call CreateNUnitsAtLoc( 1, 'h001', Player(0), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
//call SetUnitAbilityLevelSwapped( 'A001', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A000', GetTriggerUnit()) )
//call IssueTargetOrderBJ( GetLastCreatedUnit(), "entanglingroots", GetEnumUnit() )
//call UnitApplyTimedLifeBJ( 0.65, 'BTLF', GetLastCreatedUnit() )
//endfunction
function Trig_Glacier_Actions takes nothing returns nothing
local unit glaciercaster
local integer glacierloop
local location glaciercasterloc
local location glaciertargetloc
local real glacierangle
local location array glaciertemppoint
set glaciercaster = GetSpellAbilityUnit()
set glaciercasterloc = GetUnitLoc(glaciercaster)
set glaciertargetloc = GetSpellTargetLoc()
set glacierangle = AngleBetweenPoints(glaciercasterloc, glaciertargetloc)
set glacierloop = ( 7 + ( 2 * GetUnitAbilityLevelSwapped('A000', glaciercaster) ) )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = glacierloop
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerSleepAction( 0.25 )
set glaciertemppoint[GetForLoopIndexA()] = PolarProjectionBJ(glaciercasterloc, ( -100.00 + ( 200.00 * I2R(GetForLoopIndexA()) ) ), glacierangle)
call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(glaciercaster), glaciertemppoint[GetForLoopIndexA()], bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 5.00, 'BTLF', GetLastCreatedUnit() )
//call ForGroupBJ( GetUnitsInRangeOfLocAll(250.00, GetUnitLoc(GetLastCreatedUnit())), function Trig_Glacier_Func001A )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveLocation(glaciercasterloc)
call RemoveLocation(glaciertargetloc)
call RemoveLocation(glaciertemppoint[1])
call RemoveLocation(glaciertemppoint[2])
call RemoveLocation(glaciertemppoint[3])
call RemoveLocation(glaciertemppoint[4])
call RemoveLocation(glaciertemppoint[5])
call RemoveLocation(glaciertemppoint[6])
call RemoveLocation(glaciertemppoint[7])
call RemoveLocation(glaciertemppoint[8])
call RemoveLocation(glaciertemppoint[9])
call RemoveLocation(glaciertemppoint[10])
call RemoveLocation(glaciertemppoint[11])
call RemoveLocation(glaciertemppoint[12])
call RemoveLocation(glaciertemppoint[13])
call RemoveLocation(glaciertemppoint[14])
call RemoveLocation(glaciertemppoint[15])
endfunction
//===========================================================================
function InitTrig_Glacier takes nothing returns nothing
set gg_trg_Glacier = CreateTrigger( )
call TriggerAddAction( gg_trg_Glacier, function Trig_Glacier_Actions )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Glacier, EVENT_PLAYER_UNIT_SPELL_EFFECT )
endfunction
i want to make any unit around the ice freezed and take damage each second (spell based on etangle roots). Please fix it for me ^O^