与上篇介绍的使用药水技能一样,近战攻击也是作为gameplay ability来影响角色属性。
Melee Abilities In ARPG
官方文档中描述还是比较详尽的,总体上与使用药水技能是类似的。
GA_PlayerAxeMelee
与使用药水不同之处主要在于:
- Effect Container Map中有三个元素,分别使用不同的gameplay tag、target type、gameplay effect。
GA_MeleeBase
与药水基本一样,除了不需要将武器从背包中移除。
Montage(蒙太奇)
动画就复杂多了,因为近战是有Combo的。什么是Montage?见Animation Montage。
Notifies与GAS相关的notify主要是:
- RangeAttackNS:直接调用
Send Gameplay Event to Actor
发送gameplay event。 - WeaponAttackNS: 开启或关闭武器上的碰撞,gameplay event的发送由武器来负责。
(注:不同的event携带的tag不同,会激活不同的gameplay effect)
WeaponActor
在Event ActorBeginOverlap中添加Send Gameplay Event to Actor
。
紧接之后,还有一个节点为
Hit Pause
,它通过调用Set Global Time Dilation
来短暂放慢动画,以此增添打击感。当然,这是题外话。
最后,还是回到ApplyEffectContainer。在这个函数里,获得target data和gameplay effect,最终应用效果来影响属性。
网友评论