[求助]不动AI的一个头痛的问题,哪位高手能解决……
不动的农民种田时,用循环产生农田地基,可总有人种着种这就站在原地,这可怎么办??而且,要建立农田时,有时还要叫几千里远的农民来建,真是……希望有人能救救我…… 怎么换? 抱歉,刚刚花了15分钟回答,却无意中将"清空内容"按键当作"预览"键用
了,没有时间回答了.另:
"不动的农民种田时,用循环产生农田地基,可总有人种着种这就站
在原地"的问题好解决,"要建立农田时,有时还要叫几千里远的农民来
建"却要与触发一起连着用了.技术性比较高所以很难回答.---要打的字
太多了.
;以下是解决方法的一种:
;以下一句语法既可制造出“不动的AI”的效果,是所有单位都不动的那种:
;--------
(defrule
(true)
=>
(set-strategic-number sn-food-gatherer-percentage0)
(set-strategic-number sn-gold-gatherer-percentage0)
(set-strategic-number sn-stone-gatherer-percentage 0)
(set-strategic-number sn-wood-gatherer-percentage0)
(set-strategic-number sn-maximum-food-drop-distance 0)
(set-strategic-number sn-percent-civilian-explorers 0)
(set-strategic-number sn-percent-civilian-gatherers 0)
(set-strategic-number sn-percent-civilian-builders 0)
(set-strategic-number sn-task-ungrouped-soldiers 0)
(set-strategic-number sn-number-explore-groups 0)
(set-strategic-number sn-percent-enemy-sighted-response 20)
(set-strategic-number sn-enemy-sighted-response-distance 8)
(disable-self)
)
;--------
;以上语法可以作为该玩家在游戏刚开始时的默认属性使用,另外当你想要在游戏
;中指定的某一时间或地点改变这默认配置时——如游戏者的单位到达某一同盟国
;的城镇中心后,要使千里之外的该国的农民赶回来不停的种田,可以在触发里做
;以下作业:
;触发项目1
;条件:在同盟国的所在区域里有游戏者的单位*人
;触发1:发送AI指令(AI任务目标)= 1号
;触发2:移动身在千里之外的村民门回到要种植农田的地方(不是必须)
;触发项目2(多层触发):
;无条件
;触发1:地基=几块农田
;同时还需要在AI文件里有如下语发:
;---------
(defrule
(event-detected trigger 1)
=>
(set-strategic-number sn-food-gatherer-percentage100)
(set-strategic-number sn-gold-gatherer-percentage0)
(set-strategic-number sn-stone-gatherer-percentage 0)
(set-strategic-number sn-wood-gatherer-percentage0)
(set-strategic-number sn-maximum-food-drop-distance 10)
(set-strategic-number sn-percent-civilian-explorers 0)
(set-strategic-number sn-percent-civilian-gatherers 100)
(set-strategic-number sn-percent-civilian-builders 0)
(set-strategic-number sn-minimum-boar-hunt-group-size 0)
)
;--------
;注意事项:该同盟国至少要拥有一个城镇中心或者磨坊;地基农田要设在该
;同盟国的城镇中心或者磨坊的方圆10码内(象英国射手的射程差不多)。
;整个AI的内容就是上面内容的总和:
(defrule
(true)
=>
(set-strategic-number sn-food-gatherer-percentage0)
(set-strategic-number sn-gold-gatherer-percentage0)
(set-strategic-number sn-stone-gatherer-percentage 0)
(set-strategic-number sn-wood-gatherer-percentage0)
(set-strategic-number sn-maximum-food-drop-distance 0)
(set-strategic-number sn-percent-civilian-explorers 0)
(set-strategic-number sn-percent-civilian-gatherers 0)
(set-strategic-number sn-percent-civilian-builders 0)
(set-strategic-number sn-task-ungrouped-soldiers 0)
(set-strategic-number sn-number-explore-groups 0)
(set-strategic-number sn-percent-enemy-sighted-response 20)
(set-strategic-number sn-enemy-sighted-response-distance 8)
(disable-self)
)
(defrule
(event-detected trigger 1)
=>
(set-strategic-number sn-food-gatherer-percentage100)
(set-strategic-number sn-gold-gatherer-percentage0)
(set-strategic-number sn-stone-gatherer-percentage 0)
(set-strategic-number sn-wood-gatherer-percentage0)
(set-strategic-number sn-maximum-food-drop-distance 10)
(set-strategic-number sn-percent-civilian-explorers 0)
(set-strategic-number sn-percent-civilian-gatherers 100)
(set-strategic-number sn-percent-civilian-builders 0)
(set-strategic-number sn-minimum-boar-hunt-group-size 0)
) 复出了?:) 我也是个AI盲,呵呵,我的战役基本全是用不动AI完成的 me,too
如果有耐心做RPG的话,我会用“输入数字达成效果”的AI~~
页:
[1]