做了一个冲锋技能
用J写只是为了使用局部变量使其支持多人,但因为写J技术太渣,使其位移不正常,第一次冲,完好,第二次开始就会回到原点.......请指教
[jass]
function Trig_YMR_CZ_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(GetTriggerUnit())
local location l2 = GetSpellTargetLoc()
local integer i
local integer i2
local real r
local real r2
set r = ( DistanceBetweenPoints(l, l2) / 5 )
set r2 = AngleBetweenPoints(l, l2)
call RemoveLocation(l2)
set i = 1
set i2 = 5
loop
exitwhen i > i2
set l = PolarProjectionBJ(l, r, r2)
call SetUnitPositionLoc( u, l )
call AddSpecialEffectLocBJ( l, "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" )
call DestroyEffect( GetLastCreatedEffectBJ() )
call RemoveLocation(l)
set i = i + 1
call PolledWait( 0.01 )
endloop
set u = null
endfunction
[/jass] |