(翻译) 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"标签的目标,防止多次对同一目标使用该能力,使效果叠加。

这些标签配置让开发者可以创建深度丰富的游戏交互,通过逻辑条件来控制不同能力的可用性、适用性和互斥性,让游戏机制更加平衡和灵活。

 

posted @   sun_dust_shadow  阅读(113)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
点击右上角即可分享
微信分享提示