Weapon Selection System

You create the weapon BP, and then create a series of custom events for each thing it does (fire, reload, melee, whatever).

Then, inside your player BP, you get the active weapon actor, Cast To it, and call the corresponding functions.

Getting the weapon actor involves storing it on pickup as a variable for the player.

So, imagining you have a weapon system like Halo or Gears, on pickup of a weapon, you’d Set a Weapon variable to the actor you were on when you pressed “pick up”, and set an Enum that indicates that the corresponding weapon is of type X. Say you were holding a rifle and picked up a shotgun; you’d set your Weapon 2 var to THAT shotgun actor, and set the Weapon 2 slot Enum to “Shotgun”.

Then when you pressed “swap weapons” or w/e you’d set an Active Weapon variable to be the actor previously grabbed for Weapon 2, and the Active Weapon slot Enum to “shotgun”.

Then, you’d have all of your input commands feed Switch on Enums and Cast Tos. So for example, “Fire” would feed a Switch on Weapon Slot node which is connected to your “Active Weapon Slot” enum. Since that Enum is currently set to shotgun, it would feed the shotgun execution pin. That pin should then go to a Cast To node which casts the “Active Weapon” actor variable to a “MyShotgun” BP (or whatever) and calls the custom event “Fire” on that BP.

That’s how I do it, anyway.