- UID
- 2584547
- 主题
- 7
- 阅读权限
- 30
- 帖子
- 768
- 精华
- 0
- 积分
- 394
- 金钱
- 3197
- 荣誉
- 1
- 人气
- 1
- 在线时间
- 784 小时
- 评议
- 0
- 帖子
- 768
- 精华
- 0
- 积分
- 394
- 金钱
- 3197
- 荣誉
- 1
- 人气
- 1
- 评议
- 0
|
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)这样为什么不行? |
|