|
楼主 |
发表于 2008-7-31 19:09:55
|
显示全部楼层
function Scout_Actions takes unit ua ,location lt returns nothing
set Lv = GetUnitAbilityLevel(ua,'ANsh')
set Um = CreateUnit(GetOwningPlayer(ua), 'nowl', GetUnitX(ua), GetUnitY(ua), GetUnitFacing(ua))
set X = GetLocationX(lt)
set Y = GetLocationY(lt)
set Ang = bj_RADTODEG * Atan2(Y-GetUnitY(ua), X-GetUnitX(ua))
set Xt = X+ 99999*Cos(Ang*bj_DEGTORAD)
set Yt = Y+ 99999*Sin(Ang*bj_DEGTORAD)
call SetUnitAbilityLevel(Um,'A022',Lv)
call IssuePointOrderById( Um,851986,Xt, Yt)
call UnitApplyTimedLife( Um, 'B01G',Lv*7 )
call RemoveGuardPosition( Um )
endfunction
我的写法如上。 |
|