美文网首页
GAS - Gameplay Ability System Co

GAS - Gameplay Ability System Co

作者: 珏_Gray | 来源:发表于2019-03-21 17:23 被阅读0次

要让Actor使用gameplay ability system,则需要为其添加gameplay ability system component。我们需要通过C++创建具有这个componet的类,然后通过继承创建蓝图类。

ActionRPG中主角Blueprint

为Actor添加Gameplay Ability System Componet

1、需要继承IAbilitySystemInterface接口,并实现GetAbilitySystemComponent方法。



2、添加UAbilitySystemComponent*变量,并在构造函数中创建实例。


绑定用户输入到Ability(已经调用过GiveAbility了)

方法一:在SetupPlayerInputComponent中调用AbilitySystemComponet->BindAbilityActivationToInputComponent()方法。这个方法在ActionRPG中没使用,的确这个方法有点僵硬。具体可以参考:
https://wiki.unrealengine.com/GameplayAbilities_and_You#Notable_Variables
方法二:直接在蓝图中绑定


方法三:利用GameplayEvent, ActionRPG应该是利用这种方式,还没研究。

相关文章

网友评论

      本文标题:GAS - Gameplay Ability System Co

      本文链接:https://www.haomeiwen.com/subject/lcjcvqtx.html