找回密码
 点一下
查看: 1333|回复: 0

【小霜汉化】最完美的英雄选择教程

[复制链接]
发表于 2010-6-25 11:50:53 | 显示全部楼层 |阅读模式
这个还有第二份,晚上再传,
翻译软件有些术语翻译不了很抱歉
由于唐克斯已经离开蜂巢,我决定重新创建此教程。

简介:

This tutorial will show you various methods of hero selection systems.
本教程将告诉你的英雄选择系统的各种方法。
Many AoS or orpg's use hero selection systems which allow you to pick a hero out of one of the various heroes available in the game.
许多星光大道或orpg的使用英雄选择系统,让你选择一个英雄出了可在游戏中各种英雄之一。
In this tutorial I'll try to explain as good as possible on how to create such a system.
在本教程中我将尝试解释一样好可能在如何建立这样一个制度。
A map will be attached with all triggers.
阿图将附在所有触发器。
They work so you can test them yourself.
他们的工作,以便您可以测试他们自己。
Proceed to the Contents to see the index of this tutorial.
继续执行的内容,见本教程索引。
Every trigger is written in GUI (pro's: easy to understand for everybody, cons: possible lag) on the exception of a few custom scripts.
每次触发是写在图形用户界面(Pro的:每个人都容易理解,缺点:可能的滞后对一些自定义脚本的除外)。

VERY IMPORTANT: these triggers have not been de-leaked.
非常重要:这些触发器没有去泄露。
The thought behind this is that if you need a tutorial for something as simple as this, you probably don't bother about them anyway.
这背后的想法是,如果你需要一个像这样简单的事教程,你可能不关心他们的麻烦而已。
In any way, you can check out a tutorial on leaks on this website to learn more about them.
以任何方式,你可以看看这个网站上泄漏的教程,以了解他们更多。


Index:
索引:
英雄酒馆
Description: If you ever played an AoS (such as Defence of the Ancients), you have certainly seen this system.
描述:如果你打过了古人的星光大道国防部(如),你肯定见过这种制度。
Basically, you have a circle of power near a tavern.
基本上,你有权力圈附近一个小酒馆。
In this tavern you can select one of the various heroes.
在这个酒馆您可以选择不同的英雄之一。
Every tavern can only sell up to 12 heroes, but you can add multiple taverns to your map ofcourse.
每个酒馆最多只能卖出12英雄,但你可以添加多个酒馆到您的地图ofcourse。
Important note: This system is slightly different from those seen in the AoS maps.
重要注意事项:本系统是在星光大道略有地图上的不同。
In case you want to add randomize modes etc., I recommend you to download the DotA template at thehelper.net
如果您要添加随机方式等,我建议你下载同田模板在thehelper.net



Recommended: Basic knowledge of both the trigger editor and the Object editor.
推荐:基本的编辑知识都触发编辑器和对象。
Works well with 12 or more heroes.
行之有效的12个或更多的英雄。

Part 1: The Tavern Tutorial
第1部分:旅舍教程

The Object Data:
对象数据:

We will start with editing the necessary object data.
我们将开始编辑所需的对象数据。

First, we create our first hero and we change the following values:
首先,创建我们的第一个英雄,我们更改以下值:
* Stats - Food Cost: 0
*统计资料 - 食品费用:0
* Stats - Gold Cost: 0
*统计资料 - 金费用:0
* Stats - Lumber Cost: 0
*统计 - 木材成本:0
* Stats - Stock Maximum: 1
*统计资料 - 股票最多:1
* Stats - Stock Replenish Interval: 0
*统计资料 - 股票补货间隔:0
* Stats - Stock Start Delay: 0
*统计资料 - 股票开始延时:0
We repeat this process for every hero in the game.
我们重申在游戏中的每个英雄这个过程。
In this tutorial, I'll do this to 4 heroes: The 4 human heroes.
在本教程中,我会做这4个英雄:该4人的英雄。


Next we will create a new Tavern.
下一步,我们将创建一个新的小酒馆。
We create a new unit and base it on the Tavern.
我们创建一个新的单位,它立足于旅舍。
The unit is located under "Neutral, Building".
该单位是位于“中立”的构建。
We change the following value:
我们更改以下值:
Techtree - Units Sold: Add all heroes to this value.
Techtree - 单位销售:将所有的英雄与此值。
If you have more than 12 heroes, simply create a second tavern and repeat this tutorial after finishing it.
如果你有超过12个英雄,只需创建第二个酒馆和重复,完成之后这个教程。



The Map Data:
地图数据:

You need to place the tavern you just made on your map.
你需要把你刚才的小酒馆的地图上作出。
Now add circles of power (they're located in the unit palette under Neutral, Campaign) for every player and place them next to the tavern.
现在加上权力圈(它们在中性下,调色板运动单位所在地)的每个球员,把它们旁边的小酒馆。
You must create a region (in the region palette) on the map where you want your heroes to spawn.
你必须在该地区建立一个调色板地区()在地图上,您希望您的英雄产卵。
I've named this region to "HeroSpawn".
我已经向地区命名为“HeroSpawn”。



The Trigger Data:
触发数据:

Following Variables will be used in this tutorial:
下列变量将用于本教程:

The Variables:
变数:
Name
名称
Type
类型
Initial Value
初值
Array
阵列
Tavern1Heroes
Tavern1Heroes
Unit-type
单元式
Empty
空的
100
HeroChosenByPlayer
HeroChosenByPlayer
Boolean
布尔
False
12
12
TempPoint
TempPoint
Point
no
没有
no
没有

You can open the Variable Editor by going to the trigger editor and pressing "Cntrl + B" or alternativelly going to "Edit, Variables".
您可以通过将触发编辑,然后按“Cntrl + B”或alternativelly要“变编辑器编辑,变量”。

First we create a new folder.
首先我们创建一个新文件夹。
Call it "Tavern Heroes".
把它称为“酒馆英雄”。
We create a new trigger in this folder, we call it "Tavern Initialization".
我们在此文件夹创建一个新的触发器,我们把它称为“文初始化”。

This is how my trigger looks like:
这就是我的触发是这样的:
Tavern Initialization
酒馆初始化
Events
活动
Map initialization
地图初始化

Conditions
条件
Actions
行动
Set Tavern1Heroes[1] = Paladin (Tavern)
设置Tavern1Heroes [1] =帕拉丁(文)
Set Tavern1Heroes[2] = Archmage (Tavern)
设置Tavern1Heroes [2] =大法师(文)
Set Tavern1Heroes[3] = Mountain King (Tavern)
设置Tavern1Heroes [3] =山国王(文)
Set Tavern1Heroes[4] = Blood Mage (Tavern)
设置Tavern1Heroes [4] =血法师(文)
-------- If you wish to add more than 4 units to the Tavern, you must add them here.
--------如果你想增加超过4个单位的旅舍,你必须将它们添加在这里。
--------
--------




This trigger will add my 4 hero-types to a variable.
此触发器将增加我的4英雄类型的一个变量。
This will be used later.
这将是以后使用。
I have only made 4 heroes for this tutorial, in case you have more heroes, just repeat the actions for all heroes.
我只能让本教程4英雄,如果你有更多的英雄,有的只是重复所有英雄的行动。

Now we need to create the trigger where you buy a hero and move it to the "HeroSpawn" region.
现在我们需要创建一个触发器,你买英雄,将其移动到“HeroSpawn”地区。

Events
活动
Unit - A unit Sells a unit
单位 - 一个单位一个单位出售

Conditions
条件
And - All (Conditions) are true
及 - 所有(条件),则
Conditions
条件
((Sold unit) is A Hero) Equal to True
((已售单位)的英雄)等于TRUE
Or - Any (Conditions) are true
或 - 任何(条件),则
Conditions
条件
(Selling unit) Equal to Tavern 0000 <gen>
(销售单位)等于0000 <gen>旅舍








First we add the events.
首先,我们添加的事件。
This trigger will run whenever a unit (such as a tavern) sells another unit (such as a hero).
这将引发运行时如一个小酒馆单位()出售,如英雄另一个单位()。
In the conditions we check if the SOLD unit is a hero, and if the SELLING unit is the tavern you placed on the map.
在我们检查的条件,如果出售的单位是一个英雄,倘卖方单位是酒馆你在地图上放置。
If you have multiple taverns, you add those to the "OR - CONDITIONS".
如果您有多个小酒馆,那些添加了“或 - 条件”。
For example: if I have multiple taverns, my trigger will be looking like this:
例如:如果我有多个小酒馆,我的触发将看起来像这样:
Events
活动
Unit - A unit Sells a unit
单位 - 一个单位一个单位出售

Conditions
条件
And - All (Conditions) are true
及 - 所有(条件),则
Conditions
条件
((Sold unit) is A Hero) Equal to True
((已售单位)的英雄)等于TRUE
Or - Any (Conditions) are true
或 - 任何(条件),则
Conditions
条件
(Selling unit) Equal to Moon Tavern 0000 <gen>
(销售单位)等于满文0000 <gen>
(Selling unit) Equal to Sun Tavern 0001 <gen>
(销售单位)等于太阳旅舍0001 <gen>
(Selling unit) Equal to Earth Tavern 0002 <gen>
(销售单位)等于地球旅舍0002 <gen>









Next, we will add actions.
下一步,我们将增加行动。
Right now, our trigger will run when a tavern sells a hero.
现在,我们将触发时运行一个小酒馆出售英雄。
So what should happen then?
那么,应该怎样呢?
We need to check if you already bought a hero.
我们需要检查,如果你已经买了一个英雄。
When you already bought a hero, you're not allowed to buy a second hero!
当你已经买了一个英雄,你不能买第二英雄!
We will instantly remove the second hero in the "Then - Actions".
我们会立即删除第二个英雄的“那 - 行动”。
If this is your first hero, you should buy the hero and instantly move it to "HeroSpawn", where you can start the game.
如果这是你的第一个英雄,你应该买英雄并立即将它移动到“HeroSpawn”,在那里你可以开始游戏。

Tavern Hero Chosen
酒馆英雄获选
Events
活动
Unit - A unit Sells a unit
单位 - 一个单位一个单位出售

Conditions
条件
And - All (Conditions) are true
及 - 所有(条件),则
Conditions
条件
((Sold unit) is A Hero) Equal to True
((已售单位)的英雄)等于TRUE
Or - Any (Conditions) are true
或 - 任何(条件),则
Conditions
条件
(Selling unit) Equal to Tavern 0000 <gen>
(销售单位)等于0000 <gen>旅舍





Actions
行动
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] Equal to True
Herochosenbyplayer [(运动员人数(所有者(已售单元)))]等于TRUE

Then - Actions
然后 - 行动
Unit - Remove (Sold unit) from the game
股 - 删除(已售单位)从游戏
Game - Display to (All players) the text: You already chose a...
游戏 - 显示到(所有球员)的文本:您已选择甲..

Else - Actions
其他 - 行动
Set Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] = True
设置Herochosenbyplayer [(运动员人数(附(已售单元)))] =真正拥有人
Unit - Move (Sold unit) instantly to (Center of HeroSpawn <gen>)
股 - 移动(已售单位)即刻为(HeroSpawn <gen>中心)
Camera - Pan camera for (Owner of (Sold unit)) to (Center of HeroSpawn <gen>) over 1.00 seconds
照相机 - 泛摄像头(附(已售单位的业主))为(HeroSpawn <gen>中心)超过1.00秒
Selection - Clear selection for (Owner of (Sold unit))
选择 - 明确的选择(附(已售单位的业主))
Selection - Add (Sold unit) to selection for (Owner of (Sold unit))
选择 - 添加(已售单位)的选择(附(已售单位的业主))







Wait a second.
等待第二个。
Right now everyone can buy the same hero.
现在每个人都可以买到同样的英雄。
So every player will be able to play with for example a Paladin.
因此,每个球员将可以玩,例如一个圣骑士。
Now, we probably do not want to see 12 Paladins fighting on the battlefield, do we?
现在,我们可能不希望看到12圣骑士在战场上的战斗,是吗?
If we do, your trigger is finished.
如果我们这样做,你的触发器完成。
Else, go on with the tutorial.
否则,继续与教程。
So let's add the following action:
因此,让我们添加了以下行动:
Actions
行动
Player Group - Pick every player in (All players) and do (Actions)
球员集团 - 每个球员在选择(所有球员),做(行动)
Loop - Actions
环 - 行动
Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
播放器 - 让(单位(已售单位))训练不可用/建造类型(导读版播放器)





Thanks to this action, whenever someone buys a hero, this hero will no longer be available for all players.
由于这一行动,只要有人买一个英雄,这个英雄将不再适用于所有球员。

Your final trigger should look like this:
您的最终触发应该是这样的:
Tavern Hero Chosen
酒馆英雄获选
Events
活动
Unit - A unit Sells a unit
单位 - 一个单位一个单位出售

Conditions
条件
And - All (Conditions) are true
及 - 所有(条件),则
Conditions
条件
((Sold unit) is A Hero) Equal to True
((出售单位)的英雄)等于TRUE
Or - Any (Conditions) are true
或 - 任何(条件),则
Conditions
条件
(Selling unit) Equal to Tavern 0000 <gen>
(销售单位)等于0000 <gen>旅舍





Actions
行动
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] Equal to True
Herochosenbyplayer [(运动员人数(所有者(已售单元)))]等于TRUE

Then - Actions
然后 - 行动
Unit - Remove (Sold unit) from the game
股 - 删除(已售单位)从游戏
Game - Display to (All players) the text: You already chose a...
游戏 - 显示到(所有球员)的文本:您已选择甲..

Else - Actions
其他 - 行动
Set Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] = True
设置Herochosenbyplayer [(运动员人数(附(已售单元)))] =真正拥有人
Unit - Move (Sold unit) instantly to (Center of HeroSpawn <gen>)
单位 - 移动(已售单位)即刻为(HeroSpawn <gen>中心)
Player Group - Pick every player in (All players) and do (Actions)
球员集团 - 每个球员在选择(所有球员),做(行动)
Loop - Actions
环 - 行动
Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
播放器 - 让(组(已售单位))训练不可用/建造类型(导读版播放器)


Camera - Pan camera for (Owner of (Sold unit)) to (Center of HeroSpawn <gen>) over 1.00 seconds
照相机 - 泛摄像头(附(已售单位的业主))为(HeroSpawn <gen>中心)以上1.00秒
Selection - Clear selection for (Owner of (Sold unit))
选择 - 明确的选择(附(已售单位的业主))
Selection - Add (Sold unit) to selection for (Owner of (Sold unit))
选择 - 添加(已售单位)的选择(附(已售单位的业主))







Voila, I have explained how to create a Tavern.
瞧,我已经解释了如何创建一个小酒馆。
In the rest of this tutorial, I'll explain to you how to repick your hero and how to randomise it.
在本教程的其余部分,我会向你解释一下你的英雄,以重拾诚信,以及如何随机化了。

Part 2: Randomising
第2部分:随机化
When randomising, you make the computer pick for you.
当随机化,让你的电脑接你。
In other words: you don't know what hero you'll be playing.
换句话说:你不知道什么英雄,你会打。
Everything in the previous tutorial should be working already, as we will build on it.
一切都在前面的教程中应该努力了,即使我们将利用它。

The Object Data:
对象数据:

Go to the unit editor and select the Night Elf Wisp.
前往该单位的编辑,并选择暗夜精灵威斯普。
We will edit this unit (or, in case you'll use a wisp in the game, create a new one based on it).
我们将编辑这个单位(或,如果你将使用游戏中的一缕,创建一个新的以它为基础)。
Following Values will be changed:
下面的值将被改变:
    [li]
    Abilities - Normal - none
    能力 - 正常 - 无 [/li][li]
    Stats - Food Cost: 0
    统计资料 - 食品成本:0 [/li][li]
    Stats - Gold Cost: 0
    统计资料 - 金费用:0 [/li][li]
    Stats - Lumber Cost: 0
    统计资料 - 木材成本:0 [/li][li]
    Stats - Stock Maximum: 0
    统计信息 - 股票最大:0 [/li][li]
    Stats - Stock Replenish Interval
    统计信息 - 股票区间补货 [/li][li]
    Text - Name: Hero Chooser
    文字 - 名称:英雄选配 [/li][li]
    Text - Tooltip - Basic : Hero Chooser
    文字 - 工具提示 - 基本:英雄选配 [/li][li]
    Text - Tooltip - Extended: Randomise your hero!
    文字 - 工具提示 - 扩展:随机化您的英雄! [/li]
Make sure the "Stats - Stock start delay" is 0
确保“统计信息 - 股票启动延迟”为0

Finally, add your "wisp" (aka Hero Chooser) to your Tavern.
最后,添加你的“小精灵”(又名英雄选配)到您的小酒馆。
Note that the tavern can only have 11 heroes now.
请注意,只能有11酒馆的英雄了。
If you use more heroes, add them to another tavern.
如果使用更多的英雄,将它们添加到另一个酒馆。


The Trigger Data:
触发数据:

We will make a trigger that runs whenever you "buy" a "Hero Chooser" unit.
我们会触发运行每当你“买”一“英雄选配器”单位。
Events
活动
Unit - A unit Sells a unit
单位 - 一个单位一个单位出售


Conditions
条件
(Unit-type of (Sold unit)) Equal to Hero Chooser
(单元式的(已售单元))等于英雄选配



In the actions, we will be REMOVING the "Hero Chooser" unit because ofcourse we do not wish to play with a wisp.
在行动中,我们将取消“英雄选配”单位,因为ofcourse我们不想玩一一缕。
Next, we will create a random hero.
下一步,我们将创建一个随机英雄。
Ofcourse we NEED to check first if you already bought a hero before, so we will create an IF/THEN/ELSE action.
Ofcourse我们首先需要检查,如果你之前已经买了一个英雄,所以我们将创建一个IF / THEN / ELSE语句的行动。
If you have not chosen a hero yet, you will do the "Then - Actions".
如果你没有选择一个英雄,但你也将这样做“那么 - 行动”。
In those actions we create a "Tavern1Heroes" (those you set up at the "Tavern Initialization" trigger at the start of the tutorial).
在这些行动,我们创建一个“Tavern1Heroes”(这些设置在“旅舍初始化”在本教程开始触发了)。
In the array I'll put a RANDOM number between 1 and 4, because I have 4 heroes (the paladin, mountain king, archmage and bloodmage).
在数组我会把1到4之间的随机数,因为我有4个英雄(圣骑士,山王,大法师和光上面肯定不平衡)。
If I have for example 6 heroes, I will but a RANDOM number between 1 and 6.
举例来说,如果我有6个英雄,但我将介于1和6的随机数。
This is how the trigger looks like:
这是如何触发的外观如下:
Actions
行动
Unit - Remove (Sold unit) from the game
单位 - 移除(销售单位)的游戏
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] Equal to False
Herochosenbyplayer [(运动员人数(所有者(已售单元)))],公平为False

Then - Actions
然后 - 行动
Unit - Create 1 Tavern1Heroes[(Random integer number between 1 and 4)] for (Owner of (Sold unit)) at (Center of HeroSpawn <gen>) facing Default building facing degrees
股 - 创建1 Tavern1Heroes [(1和4之间的随机整数)]为(附(已售单元))斑竹(附HeroSpawn <gen>中心)的建设面临的默认面临度
Set Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] = True
设置Herochosenbyplayer [(运动员人数(附(已售单元)))] =真正拥有人

Else - Actions
其他 - 行动
Do nothing
什么也不做






Voila, that's it.
瞧,就这样。
Next in the tutorial?
下一步在本教程?
Repicking your hero.
Repicking你的英雄。

Part 3: Repicking your hero.
第3部分:Repicking你的英雄。
In many games (such as DotA, I often refer to this not because I like it, but because everyone knows this map, at least by name) you can repick your hero after choosing it.
在许多游戏,如同田(我经常提及这并不是因为我喜欢它,但因为大家都知道这个地图,至少名字),你可以重拾诚信后,选择它你的英雄。
Usually it randomises your hero.
通常它randomises你的英雄。
I will, for once, not randomise your hero and allow you to independantly choose a new hero.
我会为一次,而不是随机化你的英雄,让您自主选择一个新的英雄。

The Map Data
该地图数据
We'll need another region centered on the Tavern.
我们需要在另一个地区为中心的旅舍。
I'll call it "Tavern"
我把它称为“文”


The Trigger Data:
触发数据:

We will need some more variables.
我们将需要一些更多的变数。

The Variables:
变数:
Name
名称
Type
类型
Initial Value
初值
Array
阵列
PlayerRepicked
PlayerRepicked
Boolean
布尔
False
12
12
TempUnitGroup
TempUnitGroup
Unit Group
组组
empty
空的
none


Ok, so we want to be able to REPICK your hero.
好了,所以我们希望能够重拾诚信你的英雄。
I'll make a trigger that repicks your hero when any player writes "-repick".
我会做你的英雄触发器repicks任何球员时写道:“-重拾诚信”。
Ofcourse, I will add conditions so ou cannot "repick" when you have not chosen a hero yet or when you ALREADY repicked.
Ofcourse,我将添加条件,使欧不能“重拾诚信”当你没有选择一个英雄或者当你已经没有repicked。
Events
活动
Player - Player 1 (Red) types a chat message containing -repick as An exact match
播放器 - 播放器1(红色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 2 (Blue) types a chat message containing -repick as An exact match
播放器 - 播放器2(蓝色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 3 (Teal) types a chat message containing -repick as An exact match
播放器 - 播放器3(青色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 4 (Purple) types a chat message containing -repick as An exact match
播放器 - 播放4(紫)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
播放器 - 播放5(黄色)类型的聊天消息,其中包含,重拾诚信作为一个完全匹配
Player - Player 6 (Orange) types a chat message containing -repick as An exact match
播放器 - 播放6(橙色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 7 (Green) types a chat message containing -repick as An exact match
播放器 - 播放器7(绿色)类型的聊天消息,其中包含,重拾诚信作为一个完全匹配
Player - Player 8 (Pink) types a chat message containing -repick as An exact match
播放器 - Player 8中(粉红色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 9 (Gray) types a chat message containing -repick as An exact match
播放器 - 播放器9(灰色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 10 (Light Blue) types a chat message containing -repick as An exact match
播放器 - 播放器10(浅蓝色)类型的聊天消息,其中包含,重拾诚信作为一个完全匹配
Player - Player 11 (Dark Green) types a chat message containing -repick as An exact match
播放器 - 播放器11(墨绿色)类型的聊天消息,包含一个完全匹配,重拾诚信
Player - Player 12 (Brown) types a chat message containing -repick as An exact match
播放器 - 播放器12(棕色)类型的聊天消息,其中包含,重拾诚信作为一个完全匹配


Conditions
条件
And - All (Conditions) are true
及 - 所有(条件),则
Conditions
条件
Herochosenbyplayer[(Player number of (Triggering player))] Equal to True
Herochosenbyplayer [(运动员人数(触发球员))]等于TRUE
PlayerRepicked[(Player number of (Triggering player))] Equal to False
PlayerRepicked [(运动员人数(触发球员))]平等为False






I will use the following action
我将用以下行动
Actions
行动
Set TempUnitGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
设置TempUnitGroup =(单位所拥有(触发播放器)匹配(((选配单元)是一个英雄)等于TRUE))
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
股集团 - 选择单位和每一个TempUnitGroup做(行动)
Loop - Actions
环 - 行动
Player Group - Pick every player in (All players) and do (Actions)
球员集团 - 每个球员在选择(所有球员),做(行动)
Loop - Actions
环 - 行动
Player - Make (Unit-type of (Picked unit)) Available for training/construction by (Picked player)
播放器 - 厂名(单位为(导读单位))为培训提供/建筑类型由(导读版播放器)


Unit - Remove (Picked unit) from the game
单位 - 删除(导读单位)从游戏


Custom script:   call DestroyGroup(udg_TempUnitGroup)
自定义脚本:请DestroyGroup(udg_TempUnitGroup)



so every player will be allowed to pick the hero you just removed.
所以每一个球员将被允许选择你删除了英雄。
The custom script is required for removing a memory leak.
自定义脚本是需要消除内存泄漏。
Next, your hero should be removed from the game and you should be able to pick a new one.
接下来,你的英雄应该是从游戏中删除,您应该能够选择一个新的。
Actions
行动
Game - Display to (All players) the text: ((Name of (Triggering player)) +  has repicked a hero!)
游戏 - 显示到(所有球员)的文字:((名称(触发球员))+有repicked英雄!)
Set Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] = False
设置Herochosenbyplayer [(运动员人数(附(已售单元)))] =假业主
Selection - Clear selection for (Triggering player)
选择 - 明确的选择(触发播放器)
Selection - Add Tavern 0000 <gen> to selection for (Triggering player)
选择 - 添加旅舍甄选为0000 <gen>(触发播放器)
Camera - Pan camera for (Triggering player) to (Center of Tavern <gen>) over 1.00 seconds
照相机 - 泛相机(触发玩家)超过1.00(附文<gen>中心)秒
-------- If you only allow 1 repick per player, keep the action below --------
--------如果您只允许1次的球员重拾诚信,让下面的行动--------
Set PlayerRepicked[(Player number of (Triggering player))] = True
设置PlayerRepicked [(运动员人数(触发播放器))] =真
-------- If you allow unlimited repicks per player, remove the action above --------
--------如果你让每位玩家无限repicks,删除上述--------行动




In total, you should have the following trigger:
整体而言,你应该有以下触发器:

Tavern Hero Repick
酒馆英雄重拾诚信
Events
活动
Player - Player 1 (Red) types a chat message containing -repick as An exact match
播放器 - 播放器1(红色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 2 (Blue) types a chat message containing -repick as An exact match
播放器 - 播放器2(蓝色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 3 (Teal) types a chat message containing -repick as An exact match
播放器 - 播放器3(青色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 4 (Purple) types a chat message containing -repick as An exact match
播放器 - 播放4(紫)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
播放器 - 播放5(黄色)类型的聊天消息,其中包含,重拾诚信作为一个完全匹配
Player - Player 6 (Orange) types a chat message containing -repick as An exact match
播放器 - 播放6(橙色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 7 (Green) types a chat message containing -repick as An exact match
播放器 - 播放器7(绿色)类型的聊天消息,其中包含,重拾诚信作为一个完全匹配
Player - Player 8 (Pink) types a chat message containing -repick as An exact match
播放器 - Player 8中(粉红色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 9 (Gray) types a chat message containing -repick as An exact match
播放器 - 播放器9(灰色)类型的消息,其中包含一个聊天,重拾诚信作为一个完全匹配
Player - Player 10 (Light Blue) types a chat message containing -repick as An exact match
播放器 - 播放器10(浅蓝色)类型的聊天消息,其中包含,重拾诚信作为一个完全匹配
Player - Player 11 (Dark Green) types a chat message containing -repick as An exact match
播放器 - 播放器11(墨绿色)类型的聊天消息,包含一个完全匹配,重拾诚信
Player - Player 12 (Brown) types a chat message containing -repick as An exact match
播放器 - 播放器12(棕色)类型的聊天消息,其中包含,重拾诚信作为一个完全匹配

Conditions
条件
And - All (Conditions) are true
及 - 所有(条件),则
Conditions
条件
Herochosenbyplayer[(Player number of (Triggering player))] Equal to True
Herochosenbyplayer [(运动员人数(触发球员))]等于TRUE
PlayerRepicked[(Player number of (Triggering player))] Equal to False
PlayerRepicked [(运动员人数(触发球员))]平等为False



Actions
行动
Set TempUnitGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
设置TempUnitGroup =(单位所拥有(触发播放器)匹配(((选配单元)是一个英雄)等于TRUE))
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
股集团 - 选择单位和每一个TempUnitGroup做(行动)
Loop - Actions
环 - 行动
Player Group - Pick every player in (All players) and do (Actions)
球员集团 - 每个球员在选择(所有球员),做(行动)
Loop - Actions
环 - 行动
Player - Make (Unit-type of (Picked unit)) Available for training/construction by (Picked player)
播放器 - 让(组(导读单位))可用于培训/建造类型(导读版播放器)


Unit - Remove (Picked unit) from the game
单位 - 删除(导读单位)从游戏


Custom script:   call DestroyGroup(udg_TempUnitGroup)
自定义脚本:请DestroyGroup(udg_TempUnitGroup)
Game - Display to (All players) the text: ((Name of (Triggering player)) +  has repicked a hero!)
游戏 - 显示到(所有球员)的文字:((名称(触发球员))+有repicked英雄!)
Set Herochosenbyplayer[(Player number of (Owner of (Sold unit)))] = False
设置Herochosenbyplayer [(运动员人数(附(已售单元)))] =假业主
Selection - Clear selection for (Triggering player)
选择 - 明确的选择(触发播放器)
Selection - Add Tavern 0000 <gen> to selection for (Triggering player)
选择 - 添加旅舍甄选为0000 <gen>(触发播放器)
Camera - Pan camera for (Triggering player) to (Center of Tavern <gen>) over 1.00 seconds
照相机 - 泛相机(触发玩家)超过1.00(附文<gen>中心)秒
-------- If you only allow 1 repick per player, keep the action below --------
--------如果您只允许1次的球员重拾诚信,让下面的行动--------
Set PlayerRepicked[(Player number of (Triggering player))] = True
设置PlayerRepicked [(运动员人数(触发播放器))] =真
-------- If you allow unlimited repicks per player, remove the action above --------
--------如果你让每位玩家无限repicks,删除上述--------行动






Now, there is nothing as annoying as someone who repicks his hero in the middle of the game.
现在,有什么比讨厌的人谁repicks在比赛中他的英雄。
So if we want to prohibit players from repicking your hero after eg 45 seconds, we add the following trigger:
因此,如果我们想禁止repicking 45秒后,如你的英雄球员,我们添加下面的触发器:
Tavern Hero Repick disable
酒馆英雄重拾诚信禁用
Events
活动
Time - Elapsed game time is 45.00 seconds
时间 - 经过的比赛时间是45.00秒

Conditions
条件
Actions
行动
Trigger - Turn off Tavern Hero Repick <gen>
触发器 - 关闭旅舍英雄重拾诚信<gen>
Trigger - Turn off (This trigger)
触发器 - 关闭(这触发)





That's it, I have said everything about hero repicking in Taverns.
就这样,我已经说过的一切,英雄在酒馆repicking。
If you have any questions or you'd like to add something to this tutorial, feel free to post.
如果您有任何疑问或您想补充一点,以本教程中,随意张贴。


环路的电力英雄
In many RPG's you enter an area with many heroes standing on Circles of Power.
在许多RPG游戏的输入与电力界的地位许多英雄的地方。
Whenever a unit (usually a wisp) enters this Circle of Power, you gain your hero.
每当一个单位(通常是一缕)进入这种权力圈,你获得你的英雄。
In my example I'll use the 4 Orc heroes.
在我的例子中我将使用4个兽人英雄。


The Map Data:
地图数据:
4 Circles of Power with 4 Orc heroes.
4电力界4兽人英雄。
1 wisp in the middle of them.
1一缕在他们中间。
1 region (HeroSpawn) where our heroes will spawn.
一区(HeroSpawn)在我们的英雄会产卵。

The Object Data:
对象数据:
I'll edit the wisp so it's no longer a wisp but just a unit used for selecting the hero.
我会编辑的一缕因此它不再是一缕只是一个选择的英雄使用单位。
The following values were changed:
下面的值发生了变化:
    [li]
    Abilities - Normal - none
    能力 - 正常 - 无 [/li][li]
    Techtree - structures build - nothing
    Techtree - 结构建设 - 无 [/li][li]
    Text - Name : Hero Chooser
    文字 - 名称:英雄选配 [/li]


The Trigger Data:
触发数据:
Note: the following trigger needs to be made for EVERY selectable hero.
注意:下面的触发器需要为每一个选择的英雄了。
In other words: I'll end up with 4 triggers, 1 for each hero.
换句话说:我将结束了4触发器,每个英雄1。
As they're very similar to each others, I'll only do this for 1 hero in the tutorial:
由于他们非常相似,每个人一样,我将只在做一本教程的英雄:

Events
活动
Unit - A unit comes within 100.00 of Blademaster 0012 <gen>
单位 - 单位来内剑术0012 <gen> 100.00


Conditions
条件
(Unit-type of (Triggering unit)) Equal to Hero Chooser
(单元式的(触发单位))等于英雄选配



This trigger will run whenever the "Hero Chooser" (our edited wisp) comes close to the Blademaster.
这将引发运行时的“英雄选择器”(我们的编辑一缕)来接近剑术。
So what do we want this trigger to do?
那么我们希望这触发做什么?
We want to create a Blademaster for the owner of the Hero Chooser.
我们希望创造一个选配的英雄业主剑术。

Actions
行动
Unit - Create 1 Blademaster for (Owner of (Triggering unit)) at (Center of HeroSpawn <gen>) facing Default building facing degrees
股 - 为创建一剑术(所有者(触发单位))在(对HeroSpawn <gen>中心)的建设面临的默认面临度



This creates the Blademaster.
这将创建剑术。
Unit - Remove (Triggering unit) from the game
单位 - 删除(触发单位)从游戏



This removes the Hero Chooser from the game.
这消除了该游戏的英雄选配。
We don't want him to select another hero again.
我们不希望他再次选择另一个英雄。
Camera - Pan camera for (Owner of (Triggering unit)) to (Center of HeroSpawn <gen>) over 1.00 seconds
照相机 - 泛摄像头(所有者(触发单位)),以超过1.00(附HeroSpawn <gen>中心)秒



This pans the camera on your new Blademaster.
这盘在您的新剑术相机。
Trigger - Turn off (This trigger)
触发器 - 关闭(这触发)



We turn off the trigger so the Blademaster cannot be chosen by another player.
我们关闭触发所以剑术不能被其他玩家选择。

So this is how my final trigger looks like:
因此,这是我最后的触发如何看起来像:
CoP Blademaster
扶贫剑术
Events
活动
Unit - A unit comes within 100.00 of Blademaster 0012 <gen>
单位 - 单位来内剑术0012 <gen> 100.00

Conditions
条件
(Unit-type of (Triggering unit)) Equal to Hero Chooser
(单元式的(触发单位))等于英雄选配

Actions
行动
Unit - Create 1 Blademaster for (Owner of (Triggering unit)) at (Center of HeroSpawn <gen>) facing Default building facing degrees
股 - 为创建一剑术(所有者(触发单位))在(对HeroSpawn <gen>中心)的建设面临的默认面临度
Unit - Remove (Triggering unit) from the game
单位 - 移除(会触发单位)从游戏
Camera - Pan camera for (Owner of (Triggering unit)) to (Center of HeroSpawn <gen>) over 1.00 seconds
照相机 - 泛摄像头(所有者(触发单位)),以超过1.00(附HeroSpawn <gen>中心)秒
Trigger - Turn off (This trigger)
触发器 - 关闭(这触发)





This needs to be repeated for every hero in the game.
这需要对游戏中的每个英雄重演。

That's it.
就是这样。



对话框菜单
In some RPG's, a dialog pops up at startup.
在有些冒险的,会弹出一个对话框在启动时。
In this dialog you have various options to choose your hero.
在这个对话框中你有多种选择,选择你的英雄。
A Dialog can have unlimitted buttons, but you'll only see about max.
可以不限制一个对话框的按钮,但你只能看到关于最高。
8 a the same time on 1 screen.
8 1 1屏幕上的同一时间。
Therefor, it's not recommended to use this system with many heroes.
为此,不推荐使用该系统与许多英雄。
However, we can make a dialog with MULTIPLE pages.
不过,我们可以作出一个具有多个页面的对话。
If you have many heroes, I suggest you read this tutorial and read continue on the "Extended Dialog" tutorial.
如果你有很多的英雄,我建议你阅读本教程,并宣读继续就“扩展对话框”教程。
However, if you're only using about 6 heroes in your map, this tutorial is what you're looking for.
不过,如果你只使用你的地图约6英雄,本教程就是你要找的内容。
Please note that you can test this dialog system in the attached map by typing "-dialog".
请注意,您可以通过输入“-对话”这一附图对话系统。
As this is a testing map, it would've been annoying if it showed up at startup.
由于这是一个测试图,它会一直在困扰,如果它出现在启动了。

Recommended: Basic Triggering Knowledge.
推荐:基本触发知识。
If you know anything of dialogs, this tutorial might even be unnecessary for you.
如果你知道任何的对话,甚至可能是本教程为您不必要的。

The Map Data:
地图数据:
I need a region named "HeroSpawn".
我需要一个地区的名为“HeroSpawn”。
My hero will spawn here after selecting it.
我的英雄在这里产卵后会选择它。

The Trigger Data:
触发数据:

Following Variables are used:
使用下列变量:
The Variables:
变数:
Name
名称
Type
类型
Initial Value
初值
Array
阵列
Dialog
对话
Dialog
对话
none
none
DialogDeathKnight
DialogDeathKnight
Dialog Button
对话框按钮
none
none
DialogDreadlord
DialogDreadlord
Dialog Button
对话框按钮
none
none
DialogLich
DialogLich
Dialog Button
对话框按钮
none
none
DialogCryptLord
DialogCryptLord
Dialog Button
对话框按钮
none
none


In this example I use 4 heroes again.
在这个例子中我使用4英雄了。
For every hero, you'll need to create a variable such as the "DialogDeathKnight" variable.
对于每一个英雄,你需要创建如“DialogDeathKnight”变量的变量。
You can open the Variable Editor by going to the trigger editor and pressing "Cntrl + B" or alternativelly going to "Edit, Variables".
您可以通过将触发编辑,然后按“Cntrl + B”或alternativelly要“变编辑器编辑,变量”。


We will need to create a new folder in the trigger editor.
我们需要创建一个触发器编辑新的文件夹。
I name mine "Dialog Heroes".
我的名字我的“英雄对话”。

The first trigger will be called "Dialog Initialization"
第一个触发器将被称为“对话框初始化”
The event is obvious:
这次活动是显而易见的:
Events
活动
Game - Elapsed game time is equal to 0.5 seconds
游戏 - 经过的游戏时间等于0.5秒



The actions:
的行动:
Dialog - Change the title of Dialog to Select your hero
对话 - 更改对话框的标题选择你的英雄


This will change the title of your dialog into "Select your hero".
这将转变为“选择你的对话框的标题你的英雄”。
Dialog - Create a dialog button for Dialog labelled Death Knight
对话 - 创建一个对话框按钮对话框标记死亡骑士
Set DialogDeathKnight = (Last created dialog Button)
设置DialogDeathKnight =(最后创建对话框按钮)


Through this action, you add a new dialog button to your dialog, and you give it a name.
通过这一行动,您添加一个新的对话框按钮到您的对话框,你给它一个名称。
I named mine "Death Knight".
我叫我的“死亡骑士”。
In order to recognise this button, I need to add the second action (Set DialogDeathKnight = (Last created dialog Button)).
为了确认此按钮,我需要添加第二个动作(设置DialogDeathKnight =(最后创建对话框按钮))。
For every hero I have I must repeat those 2 actions.
对于每一个英雄,我要重复我的二行动。

Finally, I must show this dialog to every player, this will be done in the one but last action.
最后,我要显示此对话框的每一个球员,这将是做一个,但最后一个动作。

As I have 4 Heroes, this is how my trigger looks like:
正如我有4个英雄,这是我如何触发的外观如下:
Dialog Initialization
对话框初始化
Events
活动
Player - Player 1 (Red) types a chat message containing -dialog as An exact match
播放器 - 播放器1(红色)类型的消息,其中包含一个聊天,对话作为一个完全匹配

Conditions
条件
Actions
行动
Dialog - Change the title of Dialog to Select your hero
对话 - 更改对话框的标题选择你的英雄
Dialog - Create a dialog button for Dialog labelled Death Knight
对话 - 创建一个对话框按钮对话框标记死亡骑士
Set DialogDeathKnight = (Last created dialog Button)
设置DialogDeathKnight =(最后创建对话框按钮)
Dialog - Create a dialog button for Dialog labelled Dreadlord
对话 - 创建一个对话框对话框按钮标记恐惧魔王
Set DialogDreadLord = (Last created dialog Button)
设置DialogDreadLord =(最后创建对话框按钮)
Dialog - Create a dialog button for Dialog labelled Lich
对话 - 创建一个对话框对话框按钮标记巫妖
Set DialogLich = (Last created dialog Button)
设置DialogLich =(最后创建对话框按钮)
Dialog - Create a dialog button for Dialog labelled Crypt Lord
对话 - 创建一个对话框按钮对话框标记地穴领主
Set DialogCryptLord = (Last created dialog Button)
设置DialogCryptLord =(最后创建对话框按钮)
Player Group - Pick every player in (All players) and do (Actions)
球员集团 - 每个球员在选择(所有球员),做(行动)
Loop - Actions
环 - 行动
Dialog - Show Dialog for (Picked player)
对话 - 显示对话框(导读版播放器)


Trigger - Turn off (This trigger)
触发器 - 关闭(这触发)





Right now I have made a dialog that works.
现在我已经一个对话框工程。
However, nothing will happen when I press one of the buttons.
但是,什么都不会发生时,我按的按钮之一。
In order to make a button work, I need to create the following trigger:
为了使一个按钮的工作,我需要创建以下触发器:

Dialog Death Knight
对话框死亡骑士
Events
活动
Dialog - A dialog button is clicked for Dialog
对话 - 一个对话框按钮被点击的对话框

Conditions
条件
(Clicked dialog button) Equal to DialogDeathKnight
(已点击对话框按钮)等于DialogDeathKnight

Actions
行动
Unit - Create 1 Death Knight for (Triggering player) at (Center of HeroSpawn <gen>) facing Default building facing degrees
股 - 创建死亡骑士为1(触发玩家)在(对HeroSpawn <gen>中心)的建设面临的默认面临度
Camera - Pan camera for (Triggering player) to (Center of HeroSpawn <gen>) over 1.00 seconds
照相机 - 泛相机(触发玩家)超过1.00(附HeroSpawn <gen>中心)秒




The previous trigger will create a Death Knight when you press the "Death Knight" button on the dialog.
以前的触发器将创建一个死亡骑士当你按下“死亡骑士”对话框上的按钮。
I must copy this trigger for every hero I have added to the dialog.
我必须将每一个我已经添加到对话框英雄此触发器。

In fact, this is all I have to do.
事实上,这是我必须做的。
Check the attached map for the triggers in detail.
在详细检查触发附图。
As said at the start of this tutorial, you can test this dialog by typing "-dialog".
由于在本教程开始时所说,你可以测试通过键入“-对话”这个对话框。

扩展对话框菜单
This is a dialog that takes place over multiple pages, allowing you to see many options on 1 screen.
这是一个对话框,需要在多个页面的地方,让你的屏幕上看到许多选项1。
In my example, I'll allow you to choose between one of the 4 undeath heroes or 1 of the 4 NE heroes.
在我的例子中,我将让你选择的4 undeath英雄或4 1 1东北英雄。
It's recommended that you read the previous tutorial too.
它建议你阅读以前的教程了。

The Map Data:
地图数据:
I'll need a region called "HeroSpawn".
我需要一个地区称为“HeroSpawn”。
In here, my chosen hero will spawn.
在这里,我选择了英雄会产卵。

The Trigger Data:
触发数据:

Following Variables were used:
使用了下列变量:
The Variables:
变数:
Name
名称
Type
类型
Initial Value
初值
Array
阵列
EDialog1
EDialog1
Dialog
对话
none
none
EDialog2
EDialog2
Dialog
对话
none
none
DialogDeathKnight
DialogDeathKnight
Dialog Button
对话框按钮
none
none
DialogDreadlord
DialogDreadlord
Dialog Button
对话框按钮
none
none
DialogLich
DialogLich
Dialog Button
对话框按钮
none
none
DialogCryptLord
DialogCryptLord
Dialog Button
对话框按钮
none
none
DialogPriestess
DialogPriestess
Dialog Button
对话框按钮
none
none
DialogDruid
DialogDruid
Dialog Button
对话框按钮
none
none
DialogWarden
DialogWarden
Dialog Button
对话框按钮
none
none
DialogDemonHunter
DialogDemonHunter
Dialog Button
对话框按钮
none
none
DialogPageNE
DialogPageNE
Dialog Button
对话框按钮
none
none
DialogPageUD
DialogPageUD
Dialog Button
对话框按钮
none
none


Extended Dialog Initialization
扩展对话框初始化
Events
活动
Player - Player 1 (Red) types a chat message containing -extendeddialog as An exact match
播放器 - 播放器1(红色)类型的聊天消息,其中包含- extendeddialog作为一个完全匹配

Conditions
条件
Actions
行动
-------- Initializing Undeath Page --------
-------- -------- Undeath页初始化
Dialog - Change the title of EDialog1 to Select Undeath Hero...
对话 - 更改EDialog1标题选择Undeath英雄...
Dialog - Create a dialog button for EDialog1 labelled Death Knight
对话 - 创建一个EDialog1对话框按钮标记死亡骑士
Set DialogDeathKnight = (Last created dialog Button)
设置DialogDeathKnight =(最后创建对话框按钮)
Dialog - Create a dialog button for EDialog1 labelled Dreadlord
对话 - 创建一个EDialog1对话框按钮标记恐惧魔王
Set DialogDreadLord = (Last created dialog Button)
设置DialogDreadLord =(上次在对话框按钮)
Dialog - Create a dialog button for EDialog1 labelled Lich
对话 - 创建一个对话框按钮标记巫妖EDialog1
Set DialogLich = (Last created dialog Button)
设置DialogLich =(最后创建对话框按钮)
Dialog - Create a dialog button for EDialog1 labelled Crypt Lord
对话 - 创建一个EDialog1对话框按钮标记地穴领主
Set DialogCryptLord = (Last created dialog Button)
设置DialogCryptLord =(最后创建对话框按钮)
Dialog - Create a dialog button for EDialog1 labelled Next Page
对话 - 创建一个EDialog1对话框按钮标记下一页
Set DialogPageNE = (Last created dialog Button)
设置DialogPageNE =(最后创建对话框按钮)
-------- Initializing Night Elf Page --------
-------- --------页初始化暗夜精灵
Dialog - Change the title of EDialog2 to Select Night Elf He...
对话 - 更改EDialog2标题选择暗夜精灵,他...
Dialog - Create a dialog button for EDialog2 labelled Priestess of the Moon
对话 - 创建一个EDialog2对话框按钮标记的月亮女祭司
Set DialogPriestess = (Last created dialog Button)
设置DialogPriestess =(最后创建对话框按钮)
Dialog - Create a dialog button for EDialog2 labelled Druid of the Grove
对话 - 创建一个EDialog2对话框按钮标记德鲁伊的格罗夫
Set DialogDruid = (Last created dialog Button)
设置DialogDruid =(最后创建对话框按钮)
Dialog - Create a dialog button for EDialog2 labelled Demon Hunter
对话 - 创建一个EDialog2对话框按钮标记恶魔猎人
Set DialogDemonHunter = (Last created dialog Button)
设置DialogDemonHunter =(最后创建对话框按钮)
Dialog - Create a dialog button for EDialog2 labelled Warden
对话 - 创建一个对话框按钮标记沃登EDialog2
Set DialogWarden = (Last created dialog Button)
设置DialogWarden =(最后创建对话框按钮)
Dialog - Create a dialog button for EDialog2 labelled Previous Page
对话 - 创建一个EDialog2对话框按钮标签上页
Set DialogPageUD = (Last created dialog Button)
设置DialogPageUD =(最后创建对话框按钮)
-------- Showing the Dialog --------
-------- --------显示的对话框
Player Group - Pick every player in (All players) and do (Actions)
球员集团 - 每个球员在选择(所有球员),做(行动)
Loop - Actions
环 - 行动
Dialog - Show EDialog1 for (Picked player)
对话 - 显示EDialog1为(导读版播放器)


Trigger - Turn off (This trigger)
触发器 - 关闭(这触发)




This trigger is similar to the Dialog Initialization in the previous tutorial.
此触发器是类似于对话框初始化在前面的教程。
However, there are some differences: In this trigger I create TWO dialogs instead of one, each with 4 buttons.
不过,也有一些差异:在这触发我创建两个对话,而不是一个,4每个按钮。
At the end of the trigger, I show the FIRST dialog of the 2 I've made.
在触发结束时,我表明了我的第一个对话框2所做的。
Note that for every page you want your dialog to have, you actually need to create a new dialog variable and new actions in this trigger.
请注意,对于每一个页面上,您希望您的对话有,你实际上需要创建一个新的对话框变量,并在这引发新的行动。
There is another change too:
还有另外一个改变太多:

Actions
行动
Dialog - Create a dialog button for EDialog1 labelled Next Page
对话 - 创建一个EDialog1对话框按钮标记下一页
Set DialogPageNE = (Last created dialog Button)
设置DialogPageNE =(最后创建对话框按钮)



Actions
行动
Dialog - Create a dialog button for EDialog2 labelled Previous Page
对话 - 创建一个EDialog2对话框按钮标签上页
Set DialogPageUD = (Last created dialog Button)
设置DialogPageUD =(最后创建对话框按钮)



As you can see, an additional button is added to the dialog.
正如你可以看到,一个额外的按钮被添加到对话框。
It's named "Next Page" or "Previous Page".
这是名为“下一页”或“前一页”。
This will be explained later.
这将是稍后解释。


For Each hero in both dialogs, you need to make a new trigger (just like the ones made in the previous tutorial).
双方对话中的每个英雄,你需要作出就像以前的教程的一个新的触发器()。
In my example I use the Death Knight.
在我的例子我用的是死亡骑士。
Extended Dialog Death Knight
扩展对话框死亡骑士
Events
活动
Dialog - A dialog button is clicked for EDialog1
对话 - 一个对话框按钮被点击的EDialog1

Conditions
条件
(Clicked dialog button) Equal to DialogDeathKnight
(已点击对话框按钮)等于DialogDeathKnight

Actions
行动
Unit - Create 1 Death Knight for (Triggering player) at (Center of HeroSpawn <gen>) facing Default building facing degrees
股 - 创建死亡骑士为1(触发玩家)在(对HeroSpawn <gen>中心)的建设面临的默认面临度
Camera - Pan camera for (Triggering player) to (Center of HeroSpawn <gen>) over 1.00 seconds
照相机 - 泛相机(触发玩家)超过1.00(附HeroSpawn <gen>中心)秒




Remember: You NEED this trigger for every hero that is mentioned in the 2 dialogs.
请记住:您需要为每个在2英雄对话提到这个触发器。
As I have 8 heroes (4 for every dialog page), I'll need 8 triggers, similar to this one.
正如我有8个英雄,为每个对话页(4),我需要8个触发器,类似的一个。


Now, let's go back to the "Next Page" and "Previous Page" button.
现在,让我们返回到“下一页”和“上一页”按钮。
Right now it doesn't work yet.
现在还没有工作。
What we'll need to do is make a trigger that runs whenever you click the "previous page" or "next page" button.
我们需要做的是使触发器运行每当你点击“上一页”或“下一页”按钮。
The event & Condition is similar to the above trigger.
事件和条件类似上述触发。

Extended Dialog UD
扩展对话框服务台
Events
活动
Dialog - A dialog button is clicked for EDialog2
对话 - 一个对话框按钮被点击的EDialog2

Conditions
条件
(Clicked dialog button) Equal to DialogPageUD
(已点击对话框按钮)等于DialogPageUD

Actions
行动
Dialog - Show EDialog1 for (Triggering player)
对话 - 显示EDialog1对于(触发播放器)




In the actions, I'll tell the trigger to show one of the 2 dialogs.
在行动中,我会告诉触发显示的2对话之一。
In other words: when I click "Previous Page", I'll go back to the Undeath page.
换句话说:当我点击“上一页”,我将回到Undeath页。
Extended Dialog NE
东北扩展对话框
Events
活动
Dialog - A dialog button is clicked for EDialog1
对话 - 一个对话框按钮被点击的EDialog1

Conditions
条件
(Clicked dialog button) Equal to DialogPageNE
(已点击对话框按钮)等于DialogPageNE

Actions
行动
Dialog - Show EDialog2 for (Triggering player)
对话 - 显示EDialog2为(触发播放器)




Thanks to this 2nd trigger, when I click "Next Page", I'll open the NE page.
这第二触发,当我点击谢谢“下一页”,我将打开东北页。

That's it.
就是这样。
I've explained how to browse through multiple pages of a dialog system.
我已经解释了如何通过浏览多个页面的对话制度。
Dialogs are quite powerful.
对话是非常强大的。
While I have explained how to make a hero selection system, you can also use the Dialog system for other things, such as selecting your race, selecting what weapon you wish to equip, etc. etc.
虽然我已解释过如何使一个英雄选择系统,你也可以使用,比如选择你的种族,你想选择什么武器装备,等等,等等,其他的东西对话制度,


点击/ Doubleclicking。
Although this is not a very popular method, it's quite easy to implement and use.
虽然这不是一个很受欢迎的方法,这是相当容易实现和使用。
Basically, this is how the system works: In front of you are a few heroes.
基本上,这是该系统如何工作的:在你面前的是几个英雄。
By clicking on them a description pops up, and by double clicking you select the hero.
通过点击弹出的描述,并通过双击您选择的英雄。
In my example I'll use the 8 neutral heroes.
在我的例子中我将使用8个中立英雄。

The Map Data:
地图数据:
I'll need to create 8 neutral heroes (close to each others) somewhere on the map.
我需要创建8(接近对方)在地图上的某个地方中立英雄。
Next, I must make sure that you can select them.
接下来,我必须确保你可以选择它们。
Therefor, I must make sure you can actually SEE the 8 heroes.
为此,我必须确保你可以看到8个英雄。
To do this, one of my units needs to be near those heroes.
要做到这一点,我的单位之一,需要接近那些英雄。
In my example, I'll simply create a sentry ward near them.
在我的例子中,我将简单地创建一个哨兵靠近他们病房。
Next, I'll need a region where my hero will spawn.
接下来,我需要一个地区,我的英雄会产卵。
I call it "HeroSpawn".
我把它称为“HeroSpawn”。


The Trigger Data:
触发数据:

These are the variables used:
这是变量使用:
The Variables:
变数:
Name
名称
Type
类型
Initial Value
初值
Array
阵列
Selectedunit
Selectedunit
unit-type
单位类型
no unit
任何单位
12
12
SelectionHeroSelected
SelectionHeroSelected
Boolean
布尔
False
12
12


We'll only need ONE trigger.
我们只需要一个触发器。
Basically, we need to check if a unit is selected.
基本上,我们需要检查,如果一个单位被选中。
However, this trigger can only run when you have NOT chosen a hero yet and when the selected unit is one of the 8 neutral heroes I've placed on the map.
但是,这只能引发运行时没有选择英雄时尚未选定单位是我在地图上放置8中立英雄之一。
Events
活动
Player - Player 1 (Red) Selects a unit
播放器 - 播放器1(红色)选择一个单位
Player - Player 2 (Blue) Selects a unit
播放器 - 播放器2(蓝色)选择一个单位


Conditions
条件
And - All (Conditions) are true
及 - 所有(条件),则
Conditions
条件
SelectionHeroselected[(Player number of (Triggering player))] Equal to False
SelectionHeroselected [(运动员人数(触发球员))]平等为False
Or - Any (Conditions) are true
或 - 任何(条件),则
Conditions
条件
(Triggering unit) Equal to Alchemist 0019 <gen>
(触发单位)等于炼金术士0019 <gen>
(Triggering unit) Equal to Tinker 0020 <gen>
(触发单位)等于廷克0020 <gen>
(Triggering unit) Equal to Naga Sea Witch 0021 <gen>
(触发单位)等于娜迦女巫0021 <gen>海
(Triggering unit) Equal to Beastmaster 0022 <gen>
(触发单位)等于兽王0022 <gen>
(Triggering unit) Equal to Dark Ranger 0026 <gen>
(触发单位)等于黑暗游侠0026 <gen>
(Triggering unit) Equal to Firelord 0027 <gen>
(触发单位)等于火焰领主0027 <gen>
(Triggering unit) Equal to Pandaren Brewmaster 0028 <gen>
(触发单位)等于熊猫酿酒师0028 <gen>
(Triggering unit) Equal to Pit Lord 0029 <gen>
(触发单位)等于深渊领主0029 <gen>







SelectionHeroSelected is a Boolean variable.
SelectionHeroSelected是一个布尔变量。
Whenever this variable becomes "True", you have selected a hero.
每当这个变量变成了“真”,你选择了一个英雄。
In other words: we only want this trigger to run when you have not selected a hero yet.
换句话说:我们只希望这触发时运行你没有选择一个英雄呢。

In our actions we'll have to check if the player has already clicked the unit.
在我们的行动,我们将要检查,如果玩家已经点击的单位。
If that's true, a hero should be created (as you double-clicked the hero).
如果这是真的,应该建立一个英雄(如你双击的英雄)。
Else, a description will pop up
否则,会弹出一个描述

Actions
行动
Selection - Clear selection for (Triggering player)
选择 - 明确的选择(触发播放器)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
(Triggering unit) Equal to SelectedUnit[(Player number of (Triggering player))]
(触发单位)等于SelectedUnit [(球员数量(触发球员))]

Then - Actions
然后 - 行动
Unit - Create 1 (Unit-type of (Triggering unit)) for (Triggering player) at (Center of HeroSpawn <gen>) facing Default building facing degrees
股 - 创建1(单元式的(触发单位))为(触发玩家)在(对HeroSpawn <gen>中心)的建设面临的默认面临度
Set SelectionHeroselected[(Player number of (Triggering player))] = True
设置SelectionHeroselected [(运动员人数(触发播放器))] =真

Else - Actions
其他 - 行动
Set SelectedUnit[(Player number of (Triggering player))] = (Triggering unit)
设置SelectedUnit [(运动员人数(触发球员))] =(触发单位)
Wait 1.50 seconds
等待1.50秒
Set SelectedUnit[(Player number of (Triggering player))] = No unit
设置SelectedUnit [(运动员人数(触发播放器))] =任何单位





As you can see, we have an "IF/THEN/ELSE" action.
正如你可以看到,我们有一个“如果/那么/其他”的行动。
In the "IF - conditions" we check if the selected unit is the same unit as the LAST selected unit.
在“中频 - 条件”如果我们选择的单位是与上次相同的单位选择的单位检查。
If this is true, "Then - actions" will be executed.
如果这是真的,“那 - 行动”将被执行。
else, the "Else - actions" will be executed.
否则,“其他 - 行动”将被执行。
In the "Then - actions" we will create a unit of the SELECTED unit type.
在“然后 - 行动”,我们将创建一个选择的单位类型单位。
We also set "SelectionHeroselected" equal to true so you won't be able to select a 2nd hero.
我们还设立“SelectionHeroselected”等于真正让您将无法选择第二英雄。
In the "Else - actions" we will set the LAST selected unit (SelectedUnit[(Player number of (Triggering player))]) to the unit you just selected.
在“其他 - 行动”我们将选择的单位上一次(SelectedUnit [(运动员人数(触发球员))])到您刚才选定的单位。
This way, the next time you select a unit, the computer will remember what unit you selected the last time.
这样,下次你选择一个单位,电脑会记住您选择什么单位最后一次。
In the Else actions we'll also put the description of the selected unit.
在拍卖品的行动,我们还将把选定的单位说明。
For example:
例如:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
(Triggering unit) Equal to Pandaren Brewmaster 0028 <gen>
(触发单位)等于熊猫酿酒师0028 <gen>

Then - Actions
然后 - 行动
Game - Display to (Player group((Triggering player))) the text: The Pandaren Brewmaster...
游戏 - 显示至(运动员组((触发球员)))的文本:熊猫人酿酒师...

Else - Actions
其他 - 行动
Do nothing
什么也不做





This is how my final trigger looks like:
这是我最后如何触发的外观如下:
Selection Heroes
英雄的选择
Events
活动
Player - Player 1 (Red) Selects a unit
播放器 - 播放器1(红色)选择一个单位
Player - Player 2 (Blue) Selects a unit
播放器 - 播放器2(蓝色)选择一个单位

Conditions
条件
And - All (Conditions) are true
及 - 所有(条件),则
Conditions
条件
SelectionHeroselected[(Player number of (Triggering player))] Equal to False
SelectionHeroselected [(运动员人数(触发球员))]平等为False
Or - Any (Conditions) are true
或 - 任何(条件),则
Conditions
条件
(Triggering unit) Equal to Alchemist 0019 <gen>
(触发单位)等于炼金术士0019 <gen>
(Triggering unit) Equal to Tinker 0020 <gen>
(触发单位)等于廷克0020 <gen>
(Triggering unit) Equal to Naga Sea Witch 0021 <gen>
(触发单位)等于娜迦女巫0021 <gen>海
(Triggering unit) Equal to Beastmaster 0022 <gen>
(触发单位)等于兽王0022 <gen>
(Triggering unit) Equal to Dark Ranger 0026 <gen>
(触发单位)等于暗游侠0026 <gen>
(Triggering unit) Equal to Firelord 0027 <gen>
(Triggering unit) Equal to Pandaren Brewmaster 0028 <gen>
(Triggering unit) Equal to Pit Lord 0029 <gen>





Actions
行动
Selection - Clear selection for (Triggering player)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
(Triggering unit) Equal to SelectedUnit[(Player number of (Triggering player))]

Then - Actions
然后 - 行动
Unit - Create 1 (Unit-type of (Triggering unit)) for (Triggering player) at (Center of HeroSpawn <gen>) facing Default building facing degrees
Set SelectionHeroselected[(Player number of (Triggering player))] = True

Else - Actions
其他 - 行动
Set SelectedUnit[(Player number of (Triggering player))] = (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
(Triggering unit) Equal to Alchemist 0019 <gen>

Then - Actions
然后 - 行动
Game - Display to (Player group((Triggering player))) the text: The Alchemist:  War...

Else - Actions
其他 - 行动
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
(Triggering unit) Equal to Tinker 0020 <gen>

Then - Actions
然后 - 行动
Game - Display to (Player group((Triggering player))) the text: The Tinker:  Cunnin...

Else - Actions
其他 - 行动
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
(Triggering unit) Equal to Naga Sea Witch 0021 <gen>

Then - Actions
然后 - 行动
Game - Display to (Player group((Triggering player))) the text: The Sea Witch:  Mys...

Else - Actions
其他 - 行动
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
(Triggering unit) Equal to Beastmaster 0022 <gen>

Then - Actions
然后 - 行动
Game - Display to (Player group((Triggering player))) the text: The Beastmaster:  W...

Else - Actions
其他 - 行动
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
(Triggering unit) Equal to Dark Ranger 0026 <gen>

Then - Actions
然后 - 行动
Game - Display to (Player group((Triggering player))) the text: The Dark Ranger:  C...

Else - Actions
其他 - 行动
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
(Triggering unit) Equal to Firelord 0027 <gen>

Then - Actions
然后 - 行动
Game - Display to (Player group((Triggering player))) the text: The Firelord:  Myst...

Else - Actions
其他 - 行动
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
如果(所有条件为真),那么做(那动作),否则,(否则行动)
If - Conditions
如果 - 条件
(Triggering unit) Equal to Pandaren Brewmaster 0028 <gen>

Then - Actions
然后 - 行动
Game - Display to (Player group((Triggering player))) the text: The Pandaren Brewma...

Else - Actions
其他 - 行动
Game - Display to (Player group((Triggering player))) the text: The Pit Lord:  Warr...














Wait 1.50 seconds
Set SelectedUnit[(Player number of (Triggering player))] = No unit







That's it.
就是这样。
您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-12-29 19:53 , Processed in 0.128956 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表