|
1 GetCreepCamp函数的作用是什么?获取潜行单位?那么传入的两个整数呢。。。?
native GetCreepCamp takes integer min, integer max, boolean flyers_ok returns unit
2 关于DisplayText类函数
native DisplayTextIII takes integer p, string str, integer v1, integer v2, integer v3 returns nothing
integer p参数是什么作用?
似乎一般用GetAiPlayer()的样子
3 是否SetProduce只能用来造单位而不能建筑?MS "BJ"函数里都用的SetExpansion 看到有用SetProduce造建筑的。。。
4 //设置AI会替换几次被杀的防卫者? 不懂什么意思。。。
native SetReplacementCount takes integer qty returns nothing
5 等待时间攻击玩家的函数好难看懂啊,那位大人能解释下原理么?
[jass]
function CommonSuicideOnPlayer takes boolean standard, boolean bldgs, integer seconds, player p, integer x, integer y returns nothing
local integer save_peons
if not PrepSuicideOnPlayer(seconds) then
return
endif
set save_peons = campaign_wood_peons
set campaign_wood_peons = 0
loop
//xxx
if allow_signal_abort and CommandsWaiting() != 0 then
call Trace("ABORT -- attack wave override\n")
endif
//xxx
exitwhen allow_signal_abort and CommandsWaiting() != 0
loop
exitwhen allow_signal_abort and CommandsWaiting() != 0
call FormGroup(5,true)
exitwhen sleep_seconds <= 0
call TraceI("waiting %d seconds before suicide\n",sleep_seconds) //xxx
endloop
if standard then
if bldgs then
exitwhen SuicidePlayer(p,sleep_seconds >= -60)
else
exitwhen SuicidePlayerUnits(p,sleep_seconds >= -60)
endif
else
call AttackMoveXYA(x,y)
endif
call TraceI("waiting %d seconds before timeout\n",60+sleep_seconds) //xxx
call SuicideSleep(5)
endloop
set campaign_wood_peons = save_peons
set harass_length = 0
call SuicideOnPlayerWave()
endfunction[/jass]
拜谢了。。。
不知道帖子是不是违规 |
评分
-
查看全部评分
|