数学部分:
“+”,OD_BOTH,2,
“-”,OD_BOTH,2,
“*”,OD_BOTH,1,
“/”,OD_BOTH,1
“neg”,OD_LEFT,0,
“==”,OD_BOTH,2,
“<>”,OD_BOTH,2
“<”,OD_BOTH,2
“>”,OD_BOTH,2,
“<=”,OD_BOTH,2,
“>=”,OD_BOTH,2,
“|”,OD_BOTH,3,
“&”,OD_BOTH,3,
“!”,OD_LEFT,3,
“abs”,OD_LEFT
“sin”,OD_LEFT,0
“cos”,OD_LEFT,0
“tan”,OD_LEFT,0
函数
CheckKeyDown(key)
Key的值在controls里面查阅
Random(a,b)=a~~b
RandomB
双向random(center,range)
Distance(x1,y1,x2,y2) 或 Distance(dx,dy)只能
DistanceSq
Round取整
CalculateAngle(dx,dz)
CalculatePitchAngle(dx,dy,dz)
AngleDifference求角度差,并限制于-pi~pi之间
ClampAngle
Probability(v)以v(0~1)的概率返回1
Player.TryCostResource(metal energy)
/// 判断当前资源是否有那么多,如果有,扣除,并返回1,否则返回0,不扣除
Object.CreateStripe()
见脚本系统函数….
Terrain.GetHeightAtPoint(X,Z)返回Y
Formation.CheckUnitExist(index)
TF.GetTargetID(index)
TF.GetTargetPosX(index)
TF.GetTargetPosY(index)
TF.GetTargetPosZ(index)
TF.GetTargetSpeedX(index)
TF.GetTargetSpeedY(index)
TF.GetTargetSpeedZ(index)