GameplayAbilitySystem (GAS) and Variable Weapons. Or How Do I Know Which Weapon I Am?

Started messing with GAS on friday by getting the example project from the Learn tab and then reading a whole lot. Big thanks to **DanimalsOnParade for providing some excellent information in a very nice format over at **GitHub - tranek/GASDocumentation: My understanding of Unreal Engine 4's GameplayAbilitySystem plugin with a simple multiplayer sample project..

I would like to make a game system where you have multiple different kinds of weapons of the same type that do different damage. For example; different kinds of short swords which do different amounts of damage but are otherwise not really much different from one another (for now). Is there any way to populate a field on an Ability when it executes? I.e. set the current equipment slot so that the ability knows where to look for information. This is to avoid having loads upon loads of nearly identical GA’s where the only difference is the slot selected.

I noticed I can modify fields in OnAvatarSet and OnGiveAbility but these settings are not kept once the ability executes (I.e. by modifying FGameplayAbilitySpec.Ability in these functions).

I could, of course, invoke the abilities with SendGameplayEventToActor which allows an event payload to be delivered, but this still requires settings on the GA. Is this the only way to do this thing?

Are any of the Fortnite devs able to chime in on how you guys do it? :slight_smile: