How to have diffrent weapon characteristics
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.
asked Jun 04 '17 at 03:02 PM in Blueprint Scripting
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.
answered Jun 04 '17 at 04:44 PM
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.
answered Jun 10 '17 at 11:06 AM
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.
answered Apr 04 '18 at 12:01 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here