傳回指定的部隊
項目 | 內容 | 說明 |
---|---|---|
地圖上已放置的任意Unit | ||
No Unit | 無部隊(預設值) | |
Unit變數 | ||
Load Unit Handle | Load X of Y in Hashtable | 記錄在Hashtable指定位置的部隊 |
Last Created Unit | Last created unit | 最後一個由 "Unit - Create" 動作所產生的部隊 |
Last Restored Unit | Last restored unit | 最後一個由 "Game Cache - Restore Unit" 動作所取出的部隊 |
Last Replaced Unit | Last replaced unit | 最後一個由 "Unit - Replace" 動作時所取代的部隊 |
Last Haunted Gold Mine | Last Haunted Gold Mine | 最後一個由 "Neutral Building - Haunt Gold Mine (Instantly)" 動作指定纏繞的金礦 |
Picked Unit | Picked unit | 當使用 "Pick Every Unit…" 動作時,這代表每一個被選到的部隊 *例如:
Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
這個動作,假設Player 1總共有A、B、C三個部隊,這個Trigger就會依序:
Loop - Actions Unit - Set life of (Picked unit) to ((Life of (Picked unit)) / 2.00) Unit - Set mana of (Picked unit) to 0.00
Unit - Set life of (A) to ((Life of (A)) / 2.00) Unit - Set mana of (A) to 0.00 Unit - Set life of (B) to ((Life of (B)) / 2.00) Unit - Set mana of (B) to 0.00 Unit - Set life of (C) to ((Life of (C)) / 2.00) Unit - Set mana of (C) to 0.00 |
Matching Unit | Matching unit | 用這個項目來表示 "Units Matching Condition" 條件所要判定的部隊 *例如:
Units owned by Player 1 (Red) matching (((Matching unit) is A structure) Equal to True)
這個動作,假設Player 1總共有 一般部隊A、建築B、建築C 、一般部隊D 四個部隊,這個Trigger就會依序:
判斷((A) is A structure)的真假,在這個例子中,由於A不符合判斷條件,因此就不選取它
所以最後會選到部隊B、C 判斷((B) is A structure)的真假,在這個例子中,B符合判斷條件,因此就保留它 判斷((C) is A structure)的真假,在這個例子中,C符合判斷條件,因此就保留它 判斷((D) is A structure)的真假,在這個例子中,由於D不符合判斷條件,因此就不選取它 |
Random Unit From Unit Group | Random unit from Unit Group | 部隊群組中的隨機一個部隊 |
Attacked Unit | Attacked unit | 回應 "Is Attacked" 部隊事件,指代被攻擊的部隊 |
Attacking Unit | Attacking unit | 回應 "Is Attacked" 部隊事件,指代發動攻擊的部隊 |
Buying Unit | Buying unit | 回應 "Sells A Unit" 、 "Sells An Item" 及 "Pawns An Item" 部隊事件,指代買方 |
Cancelled Structure | Cancelled structure | 應 "Cancels Construction" 部隊事件,指代被取消建造的建築物 |
Casting Unit | Casting unit | 回應 "Channeling/Casting/Starts Effect/Stops/Finishes casting an ability" 部隊事件,指代施法的部隊 |
Constructed Structure | Constructed structure | 回應 "Finishes Construction" 部隊事件,指代建造好的建築 |
Constructing Structure | Constructing structure | 回應 "Begins Construction" 部隊事件,指代要開始建造的建築 |
Damage Source | Damage source | 回應 "Takes Damage" 部隊事件,指代施加傷害的部隊 |
Decaying Unit | Decaying unit | 回應 "Decays" 部隊事件,指代開始腐爛的屍體 |
Dying Unit | Dying unit | 回應 "Dies" 部隊事件,指代死亡的那個部隊 *例如:
Events
那麼,當一個食屍鬼殺死了一個步兵時,就會立刻殺死殺步兵的那隻食屍鬼Unit - A unit Dies Conditions (Unit-type of (Dying unit)) Equal to Footman Actions Unit - Kill (Killing unit) |
Entering Unit | Entering unit | 回應 "Unit Enters Region" 部隊事件,指代進入Region的部隊 *例如:
Events
那麼當一個部隊進入區域A時,就會自動移動攻擊至區域B的中心點(AOS系列地圖就是用類似這種方法命令部隊攻擊的)Unit - A unit enters Region A <gen> Conditions Actions Unit - Order (Entering unit) to Attack-Move To (Center of Region B <gen>) |
Hero Manipulating Item | Hero manipulating item | 回應 "Uses/Acquires/Loses An Item" 部隊事件,指代觸發 購買/獲得/失去 道具的那個英雄 |
Killing Unit | Killing unit | 回應 "Dies" 部隊事件,指代殺死Dying Unit的部隊。如果沒有部隊殺死它,就會傳回No Unit *例如:
Events
那麼,當一個食屍鬼殺死了一個步兵時,就會立刻殺死殺步兵的那隻食屍鬼Unit - A unit Dies Conditions (Unit-type of (Dying unit)) Equal to Footman Actions Unit - Kill (Killing unit) |
Learning Hero | Learning Hero | 回應 "Learns A Skill" 事件時,指代學習技能的英雄 |
Leaving Unit | Leaving unit | 回應 "Unit Leaves Region" 事件時,指代離開區域的部隊 |
Leveling Hero | Leveling Hero | 回應 "Gains A Level" 部隊事件,指代升級的英雄 |
Loading Unit | Loading unit | 回應 "Is Loaded Into A Transport" 部隊事件,指代被丟進運輸船的部隊 |
Ordered Unit | Ordered unit | 回應 "Is Issued An Order" 部隊事件,指代收到命令的部隊 |
Ownership-Changed Unit | Ownership-changed unit | 回應 "Changes Owner" 部隊事件,指代所有者改變的部隊 |
Researching Unit | Researching unit | 回應 "Begins/Cancels/Finishes Research" 部隊事件,指代觸發的部隊 |
Revivable Hero | Revivable Hero | 回應 "Becomes Revivable" 部隊事件,指代可以開始復活的英雄 |
Reviving Hero | Reviving Hero | 回應 "Begins/Cancels/Finishes Reviving" 部隊事件,指代 開始/取消/完成 復活的英雄 |
Selling Unit | Selling unit | 回應 "Sells A Unit" 、 "Sells An Item" 及 "Pawns An Item" 部隊事件,指代賣方 |
Sold Unit | Sold unit | 回應 "Sells A Unit" 部隊事件,指代被賣出的部隊 |
Summoned Unit | Summoned unit | 回應 "Spawns A Summoned Unit" 部隊事件,指代被召喚出的部隊 |
Summoning Unit | Summoning unit | 回應 "Spawns A Summoned Unit" 部隊事件,指代召喚者 |
Target Unit Of Issued Order | Target unit of issued order | 回應 "Is Issued An Order Targeting An Object" 部隊事件,指代命令指定的目標部隊 |
Target Unit Of Ability Being Cast | Target unit of ability being cast | 回應"Channeling/Casting/Starts an ability"部隊事件,指代技能指定的目標部隊 *很特別的,"Finishes casting an ability"和"Stops casting an ability"事件會傳回No Unit *此函數和其它的事件回傳函數不太一樣,在Wait以後往往會被重設而傳回No Unit或不正確的值。所以如果有等待的情況,最好先用變數記錄下來。 |
Targeted Unit | Targeted unit | 回應 "Acquires A Target" 部隊事件,指代被選到的目標;或者回應 "Notices a target in range" 部隊事件,指代進入射程的部隊 |
Trained Unit | Trained unit | 回應 "Finishes Training A Unit" 部隊事件,指代被訓練好的部隊 |
Transporting Unit | Transporting unit | 回應 "Is Loaded Into A Transport" 部隊事件,指代那個裝載部隊的運輸船 |
Triggering Unit | Triggering unit | 只要有部隊觸發事件,Triggering Unit就能指代觸發的部隊 *例如(以上情型大都同理,不贅述):
Events
那麼當一個部隊死亡時,就會被移除(屍體會不見)Unit - A unit Dies Actions Unit - Remove (Triggering unit) from the game |
Rally-Point As Unit | Rally-Point of Unit as a unit | 傳回指定建築所設置的起始位置(Rally Point) *如果該建築沒有設起始位置,或者起始位置不是指定部隊(可能指定一個點或樹上),則會傳回No unit |
討論區