I have a PickupWeapon C++ class that the player can pick up to get the weapon.
For each weapon in my game, there’s a Blueprint child class (deriving from the C++ PickupWeapon class) where I put the StaticMesh and other components.
When the player dies, I want to spawn a PickupWeapon that corresponds to the weapon the player had before dying… so that other players can “steal it”.
The problem is: how can I know which Blueprint child to spawn?
In the function Die() of the Character, I can spawn the PickupWeapon actor… but that’s just the Base C++ class! I want to spawn the appropiate Blueprint child class!
Could you suggest me how to do it… or maybe a better system?
Thanks in advance.