|
function M_3D_act takes nothing returns nothing
local unit u1 = GetEnumUnit()
local location a1 = GetUnitLoc(u1)
local location b1 = udg_L_Master3D
local real x1 = DistanceBetweenPoints( b1 , a1 )
local real x2 = AngleBetweenPoints ( a1 , b1 )
local location c1 = PolarProjectionBJ( a1 , x1 - 18, x2 )
call SetUnitPositionLocFacingBJ( u1, c1, x2 )
call CreateNUnitsAtLoc( 1, 'uabo', Player(11), GetUnitLoc(u1), bj_UNIT_FACING )
call RemoveLocation( a1 )
call RemoveLocation( b1 )
call RemoveLocation( c1 )
set a1 = null
set b1 = null
set c1 = null
set u1 = null
endfunction
调用后可能导致崩溃 |
|