So I have two Weapons on the ground. They have the same class, but they have different meshes and names.
So, I haven’t made any complex inventory system yet. But what I planned to do was that, when pressing a specific button, my Character would equip the LAST weapon that was picked up. I already set up the equipping part, but how do I set up that “check”? Whenever I use the Cast to Weapon block, I have no idea what to do with the “object” pin. How can I call a specific object (in this case, the last picked up weapon) from a class?
PS: Whenever I pick up a Weapn, its name and mesh are saved inside a structure. And I was planning to use that to communicate with the player Character blueprint. Because then I’d use this structure to set up the inventory system, so that you could have all weapons that you’ve picked up and choose the one to equip from there.
So, this is the portion of the Blueprint that allows my char to pick up weapons and prints a string telling me the name of the Weapon I’ve just picked up. As you can see, I’m referencing to a struct. This works.