I am working on a weapon changing system for Melee.
I would like to let the players choose between many different weapons that have different sizes and shapes and hitboxes.
And I would like to easily be able to add new weapons in the future without rewriting every actor that can use the weapon’s BluePrint.
I plan on making a separate BluePrint for each weapon that has the mesh, the hitbox, some sockets for particles, and some variables for speed damage, etc
I like having each weapon in its own self contained BluePrint as opposed to one that stores them all.
I want to toggle the weapon’s hitbox on and off, and spawn particles from sockets based on animNotify events
I am not sure what is best way to pass the right information from the AnimBluePrint back to certain Components of the Weapon’s BluePrint.
I know how to do it if I call it by name, but…
I want to avoid a long complicated switch statement with 20 outcomes that says
if he is carrying the Mace then cast to MaceBP,
if he is carrying the VorpalSword then cast to VorpalSwordBP,
Is there a way to send information to whatever Child Actor is the one that is currently in use without explicitly naming it?
and then I need to find a specific component like the Collision Component, or the socket from where I want to spawn Particles and then make something happen.
Can anyone show me an example how I can do this or point me in the right direction?