|
发表于 2007-12-10 13:13:35
|
显示全部楼层
[codes=jass]
globals
unit array wisp
real angle=0
real height=200
real radius=200
real speed=0.02
constant real step=bj_PI/6
endglobals
function flying takes nothing returns nothing
local integer index=0
set angle=angle+speed
loop
exitwhen index>11
call SetUnitXYZ(wisp[index],radius*Cos(step*index+angle),0,height+radius*Sin(step*index+angle))
set index=index+1
endloop
endfunction
function Trig_fly_Actions takes nothing returns nothing
local integer index=0
loop
exitwhen index>11
set wisp[index]=CreateUnit(Player(2),'ewsp',0,0,0)
call SetUnitColor(wisp[index],ConvertPlayerColor(index))
call UnitFlyAble(wisp[index])
set index=index+1
endloop
call TimerRun(function flying,0.02,true)
endfunction
[/codes]
说明都在地图里.
就是12个不同颜色的小精灵,在一个圆圈上转悠. |
|