How to have diffrent weapon characteristics

Hey,

So i have my Assault rifle and my Shotgun, both are child actors under a “weapon class”. I can pick them up, but i have no way of changing the characteristics so all i have is an assault rifle that has as much ammo, range and damage as a shotgun, how do i change this.

In general you should have Fire function in base class (weapon class) and weapon should have invidual code for it, probably Fire won’t be only base function you will need to do to make full blown weapon system, but that depends on weapon system you do, all common features of weapons should be based in base class. Also ammo should be managed by base class also. Alternativly you can make entire weapon system in only base class with diffrent setting varbales defining weapon behavior which you just set in child classes without any code, and base class code do as settings of weapon tell, but if you want weapons to have more freedom you should pick first option.

Hey, sorry for the long reply but real life got in the way and the like, do you mind giving me a hand with the fire function please, any tips and advice would be greatly appreciated

Hello Kyren201,

I think you should save all weapon settings in “DataTable”.

Later, if you choose which weapon can change it for him.

Or create child each of weapons.

If you are working with upgradable or dynamic weapons whose stats change over the course of the game, check out my response on this other question. I talk about how to make the parent class and use the parent weapon class to make changes the the child weapons and their stats.