How-To: Grant an Ability Set
Goal: bundle a group of abilities, effects, and attribute sets into one UCrimsonAbilitySet data asset and grant it to an ASC at runtime.
Prerequisites
You've completed the Quick Start (PS-owns-ASC pawn). You have at least one
UCrimsonGameplayAbility subclass to grant.1. Create the ability set asset
Screenshot pending
Images/CrimsonAbilitySystem/howto-create-abilityset.png2. Grant it on the server and keep the handles
Hold onto the returned FCrimsonAbilitySet_GrantedHandles if you ever need to remove the set (e.g. on death or unequip).
// Server onlyFCrimsonAbilitySet_GrantedHandles Handles;AbilitySet->GiveToAbilitySystem(ASC, &Handles);// Later, to remove everything the set granted:Handles.TakeFromAbilitySystem(ASC);
Verify
Open the Ability Dev Tools (Tools -> Crimson Ability System) in PIE - the granted abilities appear on the ASC. Inputs mapped by their contracts now activate them.
See also
- Concept: Ability System Component - the runtime hub
- Concept: Gameplay Ability - the base ability class