游侠NETSHOW论坛

标题: toe如何开始触发器 [打印本页]

作者: dihaiwangzi    时间: 2008-10-11 18:22:51     标题: toe如何开始触发器

Trigger
Trigger – set on/off the handler functions that work with events in the world
Syntax
Trigger(triggerType, ..., functionName);
Description
If the functionName parameter is not equal to nil, the function sets the handler function with
that name for the specified in-game event. Otherwise the function removes the handler from this
event. For each event, there can be only one handler function set. Setting another function onto
the event which is already handled will remove the first handler.
triggerType – in-game event type; can take on one of the following values:
NEW_DAY_TRIGGER – new day begins
WAR_FOG_ENTER_TRIGGER – the hero enters the fog of war (the behavior of the fog of war is
controlled by the SetWarfogBehaviour function)
PLAYER_ADD_HERO_TRIGGER – the player has a new hero
PLAYER_REMOVE_HERO_TRIGGER – the player has lost a hero
OBJECTIVE_STATE_CHANGE_TRIGGER – the objective’s status has been changed
OBJECT_CAPTURE_TRIGGER – the object has been captured
OBJECT_TOUCH_TRIGGER – the interactive object has been interacted with
TOWN_HERO_DEPLOY_TRIGGER – the hero leaves the town
REGION_ENTER_AND_STOP_TRIGGER – the hero enters the region (and must stay within it)
REGION_ENTER_WITHOUT_STOP_TRIGGER – the hero enters the region (and does not have to stay
within it)
HERO_LEVELUP_TRIGGER – the hero gains a level

上面是在触发文本里发现的 请问是不是能在所有地图打开  我用了下不知道为什么没有效果   附上脚本ID
触发器类 IDs
(新开始一天)NEW_DAY_TRIGGER = 0
(进入战争迷雾)WAR_FOG_ENTER_TRIGGER = 9
(为游戏者添加英雄) PLAYER_ADD_HERO_TRIGGER = 1
(为游戏者除去英雄) PLAYER_REMOVE_HERO_TRIGGER = 2
(目标状态改变)OBJECTIVE_STATE_CHANGE_TRIGGER = 3
(接触对象)OBJECT_TOUCH_TRIGGER = 4
(俘获对象) OBJECT_CAPTURE_TRIGGER = 5
(部署城镇或英雄)TOWN_HERO_DEPLOY_TRIGGER = 10
(进入区域并停止) REGION_ENTER_AND_STOP_TRIGGER = 6
(进入区域但不停止) REGION_ENTER_WITHOUT_STOP_TRIGGER = 7
(英雄升级)HERO_LEVELUP_TRIGGER = 8

偶想给godric升级 打@Trigger(8,“Godric”,1)这样为什么不行?
作者: phoenixfuking    时间: 2008-10-11 18:49:06

把名字和数值调换下试试。如果还不行那就把数值去掉。按道理英雄升级是不能设数字的
作者: dihaiwangzi    时间: 2008-10-11 18:52:10

调换的话 他说不存在名字1
作者: dihaiwangzi    时间: 2008-10-11 18:56:23

去掉数字的话 好像是说缺少啥来着
额 凤凰阿姨 野外建筑 比如圣堂军事前哨(Haven Military Post)  有的时候是1种兵  2个骑士 或者1个天使 或者3个牧师   有的时候是3种兵一起  这个能在哪设置不 我想一直都产3种兵
作者: liyidan    时间: 2008-10-11 19:38:00

所有军事前哨你都可以在编辑器打它的属性去修改,否则一般是随机的。还有LZ提到“触发器类”一般要在脚本中有“触发”条件跟相关的脚本语句。才有相应的效果。
作者: dihaiwangzi    时间: 2008-10-11 19:44:03

啊  这样的啊  谢谢了  不过我那个编辑器怎么找不到地图啊   比如说我想找世界大战怎么就找不到啊  好像没有什么 h5m的文件啊
作者: liyidan    时间: 2008-10-11 19:51:27

编辑器一般默认打开是“maps",中的文件,游戏自带的要打开它们好象很麻烦,偶没试过,不过你可以去下载几个.h5m文件然后试试。
作者: dihaiwangzi    时间: 2008-10-11 20:10:54

...俺maps一个文件也没 噢 下几个  
额  那个万恶的ai  如何设置 建造魔法塔的优先度   每次我打ai的城  别的建设都满的  就是魔法塔从来都不建的  如何使得ai也建下魔法塔??
作者: liyidan    时间: 2008-10-11 20:21:24

"ai优先建魔法塔"这可能要求助“MOD”高手帮你做一个。
作者: dihaiwangzi    时间: 2008-10-11 20:39:22

。。。。应该是修改某部分就行了吧   俺找找有没
作者: dihaiwangzi    时间: 2008-10-11 20:43:03

@createdwelling()  好像只能在地图上创建兵种建筑   
额 不知道创建 比如说像升级之树的命令是怎么打??
作者: phoenixfuking    时间: 2008-10-11 21:54:18

……汗,你要修改什么东西。
改AI的话要找到设定价值的行,把魔法塔设高一点就优先建造了。不过做MOD改起来容易,找文件难
作者: phoenixfuking    时间: 2008-10-11 22:03:18

至于前哨里出哪几种兵,我记得在地图编辑器里可以设置的。如果不设置就是随机。当然如果你要换其他兵种就要做MOD了
作者: dihaiwangzi    时间: 2008-10-11 22:48:41

额  ai那个是在哪里修改??  价值文件??  不是在default里把
作者: dihaiwangzi    时间: 2008-10-11 22:53:50

我给ai 9999999钱  一天建设是5个  但他就是不肯建设魔法塔
作者: dihaiwangzi    时间: 2008-10-11 22:59:00

<ValueOfTown>128000</ValueOfTown> ??这是??




欢迎光临 游侠NETSHOW论坛 (https://game.ali213.net/) Powered by Discuz! X2