Simple GAS Integration

Since I'm not highly experienced with the Gameplay Ability System (GAS), here's some progress on what I've done so far:

  1. Create the Ability: First, I created the ability.

  2. Set Up Variables in WB_SkillTreeSlot: Inside WB_SkillTreeSlot, I created two variables:

    • GASAbility (Gameplay Ability Class Reference)

    • InstantActivate (Boolean)

    I also checked Instance Editable for both variables.

  3. Modify the "OnAcquired" Event: Next, I opened the OnAcquired and OnUnlocked graph and navigated to the end of the OnAcquired event. Here’s the logic I added:

    • Check if GASAbility is valid.

    • Get the player (I’m casting here as an example).

    • Retrieve the Ability System from the player.

    • Depending on your preference, call either Give Ability or Give Ability And Activate Once.

    • Promote the return value to a variable.

    • Branch the InstantActivate boolean.

    • If true, use Try Activate Ability.

      At the end of the OnAcquired event

  4. Set Ability and Activation: After this, you can set the ability and decide if you want to activate it instantly.

  5. Testing with a Simple Print: I added a simple print to my ability for testing purposes. ![Image7] But this should work for that part.

  6. Clearing Abilities: Inside the AC_SkillTreeSystem, within the Reset Skill function (at the end before the function finishes), you need to:

    • Get a reference to your character or ability system.

    • Call Clear Ability from the ability system.

    • Pass in the Ability Spec Handle from the Skill Slot reference.

Since I don't have extensive knowledge of GAS, there may be some edge cases I haven’t covered. If you run into any issues, just let me know, and I’ll do my best to assist!

Last updated