Download

How to use master blueprints for multiple different actor ?

I explain myself : I wan’t to have several weapon , with different hit box and different stats , so i created one actor for each weapon. They have all the same tag “weapon”. All enemies and player have weapon. When my player is hit , the hit box overlap if it’s an weapon or not ( with the tag “weapon”) bug after i wan’t to “read” the stats of the weapon ( for exemple de damage ) bug I can’t cause I don’t find how to tell to UE4 that my weapon have all the same variable or something like that. If you have an answer , please can you share it ?

CHild actor classes are best for this. Create base weapon that has all code, ie. remembers ammo count, magazine size, type of shooting (automatic, single shoot, etc) ammo type, like bullets, hitscan, grenades, rockets. All that stuff you need for different weapons.

Then create child (inherited class), and change variables in parent class for it.

When you have child class you can set all variables for your first weapon, then copy it (and thus create next classes).

So If I understand , I need to create a “Weapon-Type” wich is a BP with all the variables I will need. Then in other weapon blueprints I had the Weapon_Type blueprints ?

Ok I understand , do you have any good tutorial about this subject ? Because I don’t find any usefull