JASS:
function Trig_Blink_Jass_Actions takes nothing returns nothing
local integer Cn = GetPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))
local unit array C[Cn] = GetSpellAbilityUnit()
local real x
local real y
local integer i = 0
local location loc
local effect sfx
set sfx = AddSpecialEffectTarget( "Abilities\\Weapons\\SpiritOfVenganceMissile\\SpiritOfVenganceMissle.mdl", C[Cn], "weapon" )
loop
if i == 10
set x = GetUnitX(C[Cn])
set y = GetUnitY(C[Cn])
set loc = (x, y)
set i = i + 0.1
call TriggerSleepAction( 0.1 )
call DestroyEffect(
call SetUnitPositionLoc( C[Cn], PolarProjectionBJ, loc, 300 + (GetUnitAbilityLevel( C[Cn], 'Cbk0' ) * 200 ), GetUnitFacing(C[Cn]))
endif
exitwhen i == 10
endloop
endfunction
function Trig_Blink_Jass_Conditions takes nothing returns boolean
if ( GetUnitTypeId(GetSpellAbilityUnit() == 'H007' ) then
return false
endif
return true
if ( GetSpellAbilityId() == 'Cbk0' ) then
return false
endif
return true
endfunction
//===========================================================================
function InitTrig_Blink_Jass takes nothing returns nothing
set gg_trg_Blink_Jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Blink_Jass, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Blink_Jass, Condition(function Trig_Blink_Jass_Conditions) )
call TriggerAddAction( gg_trg_Blink_Jass, function Trig_Blink_Jass_Actions )
endfunction
//wonder why i put wait action for 0.1?
//its because the type of spell is instant and
//you cant choose your target location where
//you can blink so if i remove the wait action and when
//the unit uses the ability it will move the unit
//instantly and will not be able to USE THE ABILITY literally.
i need suggestions on how i arrange that thingy
actually i havnt tried the trigger my self yet