blueprint

PlayerWithWeaponSystem

  • Exposure: public
  • UE Version: 5.1

drinkwater

February 4, 2023, 5:42 pm

First Person player character using enhanced input. Data Assets and Enums are used to define weapons and switch between them. You need a Primary Data Asset first which holds all weapon variables (fire rate, mesh, damage, etc.) then you make Data Assets that inherits the Primary Data Asset in which you can make individual weapons without any additional code. You then add them to an enum and switch betwen the Data Assets however you like. In the blueprint you need an object reference to the Primary Data Asset which will contain data to whatever weapon you have equipped.

Click the button above, it will automatically copy blueprint in your clipboard. Then in Unreal Engine blueprint editor, paste it with ctrl + v