(翻譯) Unreal中的gas Gameplay ability system的tag描述
https://dev.epicgames.com/documentation/en-us/unreal-engine/using-gameplay-abilities-in-unreal-engine?application_version=5.4
Tags
Gameplay Tags can help to determine how Gameplay Abilities interact with each other. Each Ability possesses a set of Tags that identify and categorize it in ways that can affect its behavior, as well as Gameplay Tag Containers and Gameplay Tag Queries to support these interactions with other Abilities.
| Gameplay Tag Variable(s) | Purpose |
|---|---|
| Cancel Abilities With Tag | Cancels any already-executing Ability with Tags matching the list provided while this Ability is executing. |
| Block Abilities With Tag | Prevents execution of any other Ability with a matching Tag while this Ability is executing. |
| Activation Owned Tags | While this Ability is executing, the owner of the Ability will be granted this set of Tags. |
| Activation Required Tags | The Ability can only be activated if the activating Actor or Component has all of these Tags. |
| Activation Blocked Tags | The Ability can only be activated if the activating Actor or Component does not have any of these Tags. |
| Target Required Tags | The Ability can only be activated if the targeted Actor or Component has all of these Tags. |
| Target Blocked Tags | The Ability can only be activated if the targeted Actor or Component does not have any of these Tags. |
GPT描述:
在Unreal Engine的Gameplay Ability System (GAS) 中,Gameplay Tags用于控制不同能力(Abilities)之間的相互作用,每個標簽(Tag)都有特定的用途,讓開發者能夠創建復雜的能力交互。以下是每種Gameplay Tag變量的解釋及示例:
1. Cancel Abilities With Tag(取消具有標簽的能力)
- 示例:假設有一個隱身模式的能力,它帶有
"Ability.Stealth"標簽。另一個爆炸攻擊能力在Cancel Abilities With Tag中包含了"Ability.Stealth"標簽。 - 效果:當爆炸攻擊被激活時,任何正在運行的、帶有
"Ability.Stealth"標簽的能力(如隱身模式)將會被自動取消。這非常適合用于當爆炸或其他大動作發生時打斷隱身或隱形狀態的能力。
2. Block Abilities With Tag(阻止具有標簽的能力)
- 示例:假設有一個盾牌防御能力帶有標簽
"Ability.Defense.Block"。如果強力攻擊的Block Abilities With Tag設置為包含"Ability.Defense.Block",則它會在強力攻擊激活期間阻止任何帶有防御標簽的能力。 - 效果:在強力攻擊激活時,玩家無法使用任何防御或格擋類的能力,這讓角色在攻擊時更加脆弱,增強了攻擊的風險和平衡性。
3. Activation Owned Tags(激活擁有標簽)
- 示例:假設一個治療光環能力的
Activation Owned Tags設置為"Effect.Aura.Healing"。 - 效果:當治療光環激活時,角色將獲得
"Effect.Aura.Healing"標簽。這個標簽可以被其他系統或能力檢測到,例如,在光環效果持續期間角色可以免疫某些負面狀態。
4. Activation Required Tags(激活必需標簽)
- 示例:如果飛行能力的
Activation Required Tags設置為"Ability.Modifier.Wings"。 - 效果:飛行能力只能在角色擁有
"Ability.Modifier.Wings"標簽的情況下才能激活。這可能意味著角色必須佩戴特定的裝備或者激活另一個授予“翅膀”標簽的能力才能進行飛行。
5. Activation Blocked Tags(激活阻止標簽)
- 示例:假設沖刺能力的
Activation Blocked Tags設置為"Status.Fatigued"。 - 效果:如果角色帶有
"Status.Fatigued"標簽(例如因為長時間奔跑導致疲勞),就無法激活沖刺能力。這可以防止角色在疲勞狀態下使用沖刺,模擬體力不足或疲憊的效果。
6. Target Required Tags(目標必需標簽)
- 示例:假設吸取法力的能力的
Target Required Tags設置為"Status.HasMana"。 - 效果:吸取法力能力只能用于具有
"Status.HasMana"標簽的目標,這可能表示目標有法力池。這確保該能力只能用于有法力的目標,而不會浪費在沒有法力的實體上(如純物理單位)。
7. Target Blocked Tags(目標阻止標簽)
- 示例:如果有一個冰凍能力,其
Target Blocked Tags設置為"Status.Frozen"。 - 效果:冰凍能力將無法用于任何已經擁有
"Status.Frozen"標簽的目標,防止多次對同一目標使用該能力,使效果疊加。
這些標簽配置讓開發者可以創建深度豐富的游戲交互,通過邏輯條件來控制不同能力的可用性、適用性和互斥性,讓游戲機制更加平衡和靈活。

浙公網安備 33010602011771號