[Help] Add Abilities at Runtime - Lyra Project

Hello,
I’m currently working on adding a system to the Lyra Starter Project that allows a player to choose a unique ability for their character before a match begins. (Think Load-Outs)
I’ve created a handful of abilities from a base class using GAS and now am trying to implement choosing an ability at runtime.

It’s pretty easy to add an ability to the AbilitySet defined for an experience, but this approach doesn’t allow me to change the ability at runtime. I’ve set up input actions to trigger the ability and verified they work by adding the ability like this:

However, if I add the ability to the character at runtime using the “GiveAbility” function, I am unable to activate the ability. The “Event ActivateAbility” does not fire inside the gameplay ability class. Here is how I’m adding the ability to the B_Hero_ShooterMannequin:

image

Here is the ability trigger set up inside my gameplay ability:

image

If someone could offer some advice on this topic it would be much appreciated!

2 Likes