Hi, I’m working on a personal project at the moment and want to create a weapon system pretty much identical to the one seen in Bloodborne. Essentially a button that transforms the weapon from one state to another with a different mesh, moveset and stats. I’ve only recently started using Unreal so I don’t have a full grasp of its capabilities and wanted some advice on different methods of achieving the system I want.
The method that I initially used was to have a structure that contained both the untransformed mesh and combos alongside the transformed ones, then I’d use a boolean called IsWeaponTransformed that would flip flop when an action input was pressed. The weapons normal attack combo had a branch checking for the boolean I mentioned and would assign the transformed combo if true, or the normal combo if false.
The reason I stopped using this method is because it meant doubling all my weapon related code, I would branch every Player action input to check for IsWeaponTransformed and then copy the code assigning the normal attack sequence and reassign it to the transformed attack sequence. I assumed that what I was doing is convoluted so I scrapped it and looked for a better method.
The second method I could think of is to have the transformed weapon and untransformed weapon be two separate blueprints that have a class reference of each other in their structures, this would mean I didn’t have to check for a boolean or reassign animations because both the weapon blueprints would use the same array for their respective normal attack combos. The problem I’m running into with this is trying to access the Weapon details structure of the class reference from the structure so that I can swap the weapons.
Here is a screenshot of the Mainhand Details Structure:
And a screenshot of the node I want to get the transformed blueprints structure reference from.
I get the impression that what I’m trying to do Isn’t very hard I’m just going about it the wrong way, if anyone has any suggestions or any tutorials/documentation that would point me in the right direction I would be grateful. I’m already going through some inventory tutorials because I think they might be relevant to storing class references of actor that are not present in the world.