Download

Enumerator Question

Searched around and found a bit of info from some talented forum members. Pablookas had this scenario (See attached Photos) set up for weapon switching using an enum - and that same enum could be used to change animation states in the animBP/Graph. Pretty cool stuff - BUT, how do I get the enumerator to KNOW what it’s pointing at? The values in the enumerator are the names of my weapons, but aside from that, I have no idea how to use that to point to the weapons themselves, which are stored outside of the character BP, and in their own weapon Blueprints.

Those weapon blueprints contain the weapon logic and firing mechanisms, along with the physical representation of the guns, and the “code” for picking them up and letting the Character BP know that they have that weapon once “picked up” (On EventBeginOverlap > Destroy actor > cast to character BP > set character BP Bool Variable “HasTommyGun” to TRUE)

My current setup is this:

Once the player has picked up the weapon (HasTommyGun TRUE)
The desired weapon slot (1) is pressed on the keyboard numpad (ActionInput Weapon Slot 1)
I have it set to spawn the weapon actor from blueprint class > and attach it to the weapons socket in the character’s hands. Cool, it gets the job done kind of, but I’d really like to have an enum set up to handle stuff like in the attached photos.

Thanks!