触发器分3个部分
执行人,条件,结果
执行人随便写,只有一个触发和执行人有关(是结盟的触发)
注意,如果你写 force 4 (第4组)
而force 4你没有放一个玩家
或有一个人类玩家,但他没加入游戏
那么执行人为 force 4 的触发都不会执行
(就是要有人或电脑来执行)
条件有很多种
ACCUMULATE Player accumulates quantity resources.
该玩家积累多少资源时
ALWAYS Always.
总是
BRING Player brings quantity units to location.
该玩家带多少单位到特定区域时
COMMAND Player commands quantity units.
该玩家控制多少单位时
COMMAND THE LEAST Current player commands the least units.
当前玩家最少控制多少单位时
COMMAND THE LEAST AT Current player commands the least units at location.
当前玩家在特定区域最少控制多少单位时
COMMAND THE MOST Current player commands the most units.
当前玩家最多控制多少单位时
COMMAND THE MOST AT Current player commands the most units at location.
当前玩家在特定区域最多控制多少单位时
COUNTDOWN TIMER Countdown timer is duration game seconds.
游戏时间倒数计时多少秒时
DEATHS Player has suffered quantity deaths of unit.
该玩家损失多少单位时
ELAPSED TIME Elapsed scenario time is duration game seconds.
游戏时间经过多少秒时(游戏时间)
HIGHEST SCORE Current player has highest score points.
当前玩家得分最高时
KILL Player kills quantity units.
该玩家杀死一定数量的单位时
LEAST KILLS Current player has least kills of unit.
当前玩家杀死单位最少时
LEAST RESOURCES Current player has least resources.
当前玩家积累资源最少时
LOWEST SCORE Current player has lowest score points.
当前玩家得分最低时
MOST KILLS Current player has most kills of unit.
当前玩家杀死单位最多时
MOST RESOURCES Current player has most resources.
当前玩家积累资源最多时
NEVER Never. 从不
OPPONENTS Player has quantity opponents remaining in the game.
该玩家在游戏拥有多少对手时
SCORE Player score type score is quantity.
该玩家得分是多少时
SWITCH Switch is set.
开关被设置或清除时
(慢慢看,3分钟后再看下面)
结果也有很多种
CENTER VIEW Center view for current player at location.
将画面转至某特定区域
COMMENT Comment: comment.
对触发器加以说明,使之便于阅读
CREATE UNITS Create quantity unit at location for player
在特定区域为玩家创造一定数量的单位
CREATE UNITS WITH PROPERTIES Create quantity
unit at location for player. Apply properties
在特定区域为玩家创造一定数量的具有一定属性(如隐形,钻地等)的单位
DEFEAT End scenario in defeat for current player.
当前玩家任务失败
DISPLAY TEXT MESSAGE Display for current player: text.
为当前玩家显示一些交代文字
DRAW End the scenario in a draw for all players.
所有玩家平手
GIVE UNITS TO PLAYER Give quantity units owned by player at location to player.
将特定区域的一个玩家(前者)的一定数量的部队给另一个玩家(后者)
KILL UNIT Kill all units for player.
杀死玩家的所有单位
KILL UNITS AT LOCATION Kill quantity units for player at location.
杀死玩家的在特定区域的一定数量的单位
LEADER BOARD (CONTROL ATLOCATION)
Show Leader Board for most control of units at location. Display label: label
显示目前特定区域里的单位控制情况
LEADER BOARD (CONTROL)
Show Leader Board for most control of unit. Display label: label
显示目前单位控制情况
LEADER BOARD (GREED)
Show Greed Leader Board for player closest to accumulation of number ore and gas.
显示目前总的资源收集情况
LEADER BOARD (KILLS)
Show Leader Board for most kills of unit. Display label: label
显示目前杀死单位的情况
LEADER BOARD (POINTS)
Show Leader Board for most points. Display label: label
显示目前得分情况
LEADER BOARD (RESOURCES)
Show Leader Board for accumulation of most resource. Display label: label
显示目前资源收集情况
LEADER BOARD GOAL(CONTROL AT LOCATION)
Show Leader Board for player closest to control of number of units at location. Display label: label
显示还需在特定区域里控制多少单位可达目标
LEADER BOARD GOAL(CONTROL)
Show Leader Board for player closest to control of number of unit. Display label: label
显示还需控制多少单位可达目标
LEADER BOARD GOAL (KILLS)
Show Leader Board for player closest to number kills of unit. Display label: label
显示还需杀死多少单位可达目标
LEADER BOARD GOAL (POINTS)
Show Leader Board for player closest to number points. Display label: label
显示距离目标得分还差多少
LEADER BOARD GOAL(RESOURCES)
Show Leader Board for player closest to accumulation of number resource. Display label: label
显示还需收集资源可达目标
LEADER BOARD COMPUTER PLAYERS Set use of computer players in leaderboard calculations.
关闭或打开电脑的情况显示
MINIMAP PING Show minimap ping for current player at location.
当前玩家的小地图显示警告框
MODIFY UNIT ENERGY Set energy points for quantity units owned by player at location to percent%.
修改特定区域里一定数量的玩家控制单位的能量
MODIFY UNIT HANGAR COUNT Add at most quantity to hangar for quantity units at location owned by player.
修改特定区域里一定数量的玩家控制单位的弹药(如航母,金甲虫)
MODIFY UNIT HIT POINTS Set hit points for quantity units owned by player at location to percent%.
修改特定区域里一定数量的玩家控制单位的生命值
MODIFY UNIT RESOURCE AMOUNT Set resource amount for quantity resource sources owned by player at location to quantity.
修改特定区域里一定数量的玩家控制单位的能量
MODIFY UNIT HANGAR COUNT Add at most quantity to hangar for quantity units at location owned by player.
修改特定区域里一定数量的玩家控制单位的弹药(如航母,金甲虫)
MODIFY UNIT HIT POINTS Set hit points for quantity units owned by player at location to percent%.
修改特定区域里一定数量的玩家控制单位的生命值
MODIFY UNIT RESOURCE AMOUNT Set resource amount for quantity resource sources owned by player at location to quantity.
修改特定区域里一定数量的玩家控制单位的能量
MODIFY UNIT SHIELD POINTS Set shield points for quantity units owned by player at location to percent%.
修改特定区域里一定数量的玩家控制单位的护盾
MOVE LOCATION Center location labeled location on units owned by player at location.
将一个特定区域移动到一个单位身上在一个特定区域内
MOVE UNITS Move quantity units for player at location to destination.
将玩家一定数量的单位由一个特定区域移动到另一个特定区域
MUTE UNIT SPEECH Mute all non-trigger unit sounds for current player.
关闭当前玩家所有非触发单位的声音
ORDER Issue order to all units owned by player at location: order to destination.
命令玩家的单位在从一个特定区域里移动.攻击.巡逻到另一个特定区域
PAUSE GAME Pause the game.
暂停游戏
PAUSE TIMER Pause the countdown timer.
暂停倒计时
PLAY WAV Play WAV file
播放一段声音
PRESERVE TRIGGER Preserve Trigger.
循环执行当前触发
REMOVE UNIT Remove all units for player.
移除玩家所有单位
REMOVE UNITS AT LOCATION Remove quantity units for player at location.
移除玩家在特定区域里的一定数量的单位
RUN AI SCRIPT Execute AI script script.
运行一个人工智能
RUN AI SCRIPT AT LOCATION Execute AI script script at location.
在特定区域运行一个人工智能
SET ALLIANCE STATUS Set Player to Ally status.
设置当前玩家与另一个玩家同盟或敌对
SET COUNTDOWN TIMER Modify Countdown Timer: Set duration seconds.
设置倒计时时间
SET DEATHS Modify death counts for player: Set quantity for unit.
设置玩家的死亡单位计数
SET DOODAD STATE Set doodad state for units for player at location.
特定区域里小物件的设置
SET INVINCIBILITY Set invincibility for units owned by player at location
设置特定区域里的玩家单位无敌
SET MISSION OBJECTIVES Set Mission Objectives to: text.
设定本关任务
SET NEXT SCENARIO Load scenario after completion of current game.
设定当前任务结束后读取的地图
SET RESOURCES Modify resources for player: Set quantity resource.
为玩家设定一定数量的资源
SET SCORE Modify score for player: Set quantity points.
设定玩家得分
SET SWITCH Set switch.
开关设置
TALKING PORTRAIT Show unit talking to current player for duration milliseconds.
为当前玩家显示单位肖像一段时间
TRANSMISSION Send transmission to current player from unit at location.Play WAV file.Modify transmission duration: Set number milliseconds.Display the following text: Text
设置一段对话。包括小地图上单位的地点显示,伴随的声音及文字
UNMUTE UNIT SPEECH Unmute all non-trigger unit sounds for current player.
解除当前玩家所有非触发单位的声音的关闭
UNPAUSE GAME Unpause the game.
解除游戏暂停
UNPAUSE TIMER Unpause the countdown timer.
解除倒计时暂停
VICTORY End scenario in victory for current player.
当前玩家任务胜利
WAIT Wait for duration milliseconds.
等待一段时间(千分之一秒)
(看5分钟后再接着看)
条件满足了就会执行结果
比如:
条件:我至少杀了一个人(player 1 kill at least one any unit)
结果:把我移动到监狱.
(Move all units for player 1 at anywhere to 监狱.)
星际RPG地图制作(三)AI的使用
首先大家应该知道的是AI脚本有两大类:
1.是无分位置(Location,以下内容不作解释)的AI脚本
2.是在指定位置运行的AI脚本
先讲第一种吧:它的Actions是Run AI Script,其中有三项
1.Send all unit on strategic suicide missions:是一种有计谋的杀戮行动!会把自己的兵力像是开扁似的全叫去打(只要去得到的地方),直至可能被杀到的敌人(包括以其敌对的电脑玩家!以下内容不作解释)全死或自己部队全死,否则就不停的杀杀杀!
2.Send all unit on random suicide missions:像是没用使用任何AI时一样,但警觉范围明显更大。
3.Switch computer player rescue passive:就是让该Player进入被缓救状态(就是你走前去就会加入的那种),简单地说该Player的Control(Player/Setting.....)变了Rescuable。
还有一个特别的难度(其实不是难度等级):
Area town:只采矿,几乎不发展和造兵的AI!如果用于设置任务中电脑的分基地的AI的话就非常有用(这才是真正用途)。
注:加了Expansion字眼的AI是指以血战为基础的AI,若用没有Expansion一词的AI将不造血战的新兵种(如医生之类)和不升级新的科技(如大象的速度和皮+2的升级)!当然用来有Expansion字眼的AI文件会存为SCX文件。
设置联盟状态AI脚本:
Set player to(*状态)
*Enemy:以Player为敌;
*Ally:以Player为盟。
注:这种AI与Actaion中的Set alliance status有异曲同工之效(但是并非完全一样)!
value this Area higher:使电脑玩家在所用之处放兵力防守,一般是让电脑看守重要地方或建筑的AI。
Enter closest bunker:所用之处的Terran人自动进入最近的堡垒。
还有就是进出运输工具(各族的)
(*动作)Transport:
*Enter:陆地兵种们会进入该位置的运输工具;
*Exit:相反,这个AI会使运输工具里的东东出来。
注:Enter closest bunker和Enter/Exit Transport,还有Set player to Enemy/ally是可用在人类(Human)玩家上的。
怎样才能使电脑有好的作战AI呢?
注意以下几点:1.如果让电脑白手起家的话只是将位置放在总部上即可以,
但是要记住Zerg要给1个Overlord!
2.如果开头电脑玩家有相当范围的基地就把位置几乎覆盖整个基地较好。
3.如果要一个Super电脑,可帮它设一个作弊板机,例如:
Conditions:
-Alway
Actions:
-Modify resources for Current Player:Set 5000 Ore and Gas
-Preserve trigger
这样电脑就有用不尽的资源,呵呵.......
4.别让电脑在Anywhere运行AI不然(发疯的采矿)......而且在运行AI的板机后面不要加Preserve trigger-狂造总部!!!还不能让一个电脑在二个有一定距离的地方用两个AI脚本!不然,它的工兵会跑个不停。呵呵,但可在分基地处用Campaign Area Town
星际RPG地图制作教程(四)开关的使用
这回给大家讲讲Switch的使用,到底什么是Switch?很简单,就是“开关”的意思,更可作“记号”来理解。现在先渐渐有关Switch板机中的几个知识点:
首先是Switch Action里的几个状态:
1.Set:相当于我们把开关打开。
2.Clear:和Set相反,就是把开关关闭。
3.Toggle:Set与Clear间状态的切换,就是说本来是Set的状态,Toggle发生后就变成Clear了。反过来一样。
4.Random:随机,就是让电脑选择是Set还是Clear,但是Toggle就不知道了,可用来搞RPG的“踩地雷”。
总共有256个开关!! 不会不够用了吧?呵呵,但用起来怎么搞得清哪个打哪个?这就有了Rename功能,你可以用它来为你的Switch#改名,就不会搞错啦!呵呵!
有了这些功能就可制作一些次序鲜明的地图板机。
比如要做一个先是让玩家挑难度,再让玩家选种族的地图,只用3个位置(Location),一个人族平民(Civilian),怎么才能做到两个步骤有先后分明之后呢?
这里举一例:先作三个位置分别叫Easy-Zerg,Medium-Terran,Hard-Protoss(这是用来方便记忆,其实名称随便好记就行),再作一个叫Civilian的位置(在该位置创建Terran Civilian)。
如果根据上述条件,不用“开关”即“Switch”,挑难度与选种族的步骤就会重复,很麻烦!
若使用“Switch”问题就好解决了(假如Player1是Human玩家,Player2为Computer且为Zerg):
Player:-Player2
Conditions:-Player1 bring last 1 Terran Civilian to “Easy-Zerg”
Actions:-Execute AI Script“Zerg Campaign Easy”At location“(你所选择给Player2的位置)”
- Set “Switch1”(用哪个都无所谓好记就行,也可用“Rename...”项改个好记的名字给它)
-Remove 1 Terran Civilian for playe1 at“Easy-Zerg”
-Create I Terran Civilian at “Terran Civilian”
这样就完成了第一步,下一步是挑种族了,再创建一个Civilian,再设:
Player:-player1
Conditions:-Player1 bring last 1 Terran Civilian to “Easy-Zerg”
-“Switch1”(就是上一个板机中Actions里Set的那一个)is set
Actions:-Create 1 Zerg Hatchery at “(你设哪就哪)”for Player1
再举一例:我设一个狗狗赛跑比赛(来回走),如何证实某玩家已经到达转弯点位置才回到终点呢?
看看吧:设起跑位置是Start,中转点是Turn,Player1,Player2都为Human玩家。
先是:Player:-Player1
Conditions:-Current player bring last 1 (Zergling)to“Turn”
Actions:-Set “Turned”(我把我选的Switch 用Rename项从命名为Turned了)
第二步:就设:
Player:-Player1
Conditions:-Current player bring last 1(你选择的Unit)to “Start”(来回一次了)
-“Turned”is set
Actions:-End Scenario in victory for current player(胜利板机Victory)
我们知道在我们联机时同盟一般是共享视野的,但是在任务中,我们共享视野却要费一番周折,因为暴雪在原版的战役编辑器中没有提供大家共享视野的脚本。在force设置用,我们可以把同一个force的玩家设置为联盟、共享视野。但是如果玩家和电脑联盟,共享视野却不起作用。我们需要用到Turn ON/OFF shared vision for Player X脚本,此脚本能对电脑(computer player)和玩家都起作用。很简单,不过却非常实用。
程序如下:
Owner:
- Player 1
Conditions:
- Elapsed scenario time is at least 0 game seconds.
Actions:
- Execute AI script ’Turn ON shared vision for Player 2’.