- Joined
- Nov 15, 2010
- Messages
- 112
How I wanna make this trigger:
with library???
JASS:
function Hellfire_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local real f = GetUnitFacing(u)
local player p = GetTriggerPlayer()
//-------------------------------
local real xx
local real yy
local integer i = 1
local unit d
loop
exitwhen i > 15
set xx = x + (50 * i) * Cos(f * bj_DEGTORAD)
set yy = y + (50 * i) * Sin(f * bj_DEGTORAD)
set d = CreateUnit( p, 'h000', xx , yy , 0 )
call UnitAddAbility(d, 'AHtc')
call UnitApplyTimedLife(d, 'BTLF', 1.50)
call IssueImmediateOrder(d, "thunderclap")
set i = i + 1
endloop
set u = null
set d = null
set p = null
endfunction
function Hellfire_Condition takes nothing returns boolean
return GetSpellAbilityId() == 'ANbf'
endfunction
function InitTrig_Hellfire takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Hellfire_Condition ) )
call TriggerAddAction( t, function Hellfire_Actions )
endfunction
with library???