Gtam
Lerning how to write and read!! Yeah.
- Reaction score
- 164
Why dont this work. There is no KnockBack
JASS:
function Trig_Bolt_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;AHtb039;
endfunction
function Trig_Bolt_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local real x = GetUnitX(t)
local real y = GetUnitY(t)
local real f = GetUnitFacing(u)
local integer i = 0
loop
set i = i + 1
call SetUnitPosition(t, x + 5 * Cos(f * .0175), y + 5 * Sin(f * .0175))
call TriggerSleepAction(.03)
exitwhen i == 100
endloop
endfunction
//===========================================================================
function InitTrig_Bolt takes nothing returns nothing
set gg_trg_Bolt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bolt, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Bolt, Condition( function Trig_Bolt_Conditions ) )
call TriggerAddAction( gg_trg_Bolt, function Trig_Bolt_Actions )
endfunction