How to store weapon fire modes in a data table?

I’ve been trying to create a weapon loadout system (like Call of Duty) and I have been using Data Tables to do so. The thing is, the weapons I plan to use are more arcadey and have alt-fires similar to the ones seen in games like Unreal Tournament and Doom Eternal, but because the effects of the alt-fire are so varied (some summon projectiles while some switch the weapon to fully automatic) it’s hard to classify it under just one class. Some insight would be helpful. Thanks.

you could use an array of Enums or GameplayTags and then use a switch to use the appropriate ability

1 Like

Would this be through GAS or is there another method I don’t know about?

i havent used GAS myself but if so you’d be using the ‘Tag’ to choose what ability to alt-fire so it should work with anything.

you alt fires could even be an actor component that you add/remove to the weapon as desired and then choose which one to activate based on the ‘tag’

Could you go a little more in depth? I’m not sure I’m totally understanding what you’re saying.

if you mean firemode you can use an array of GameplayTags such as
Firemode.Single
Firemode.Burst
Firemode.FullyAuto
etc

if you mean fire modes like normal and alt-fire id create an actor component to handle the logic, create an EventFire and in the component you can handle the logic anyway you like,

so you can have a component for normal fire which shoots a projectile and another childcomponent that fires rockets or something.

1 Like

You could use an enum for the full range of fire types and a UENUM(meta=(Bitflags``))` uproperty to set the available enum entries for a specific weapon