GAS - Gameplay Ability System Componet


要让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应该是利用这种方式,还没研究。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容