Download

Blueprint communications in multiplayer

Say you have a player character who has variables stored like Health and Ammo, then the player character approaches a vehicle pawn and enters it… How would I store or add those variables in the vehicle so they can be given back to the player character when they leave the vehicle in a multiplayer game?

I’ve used blueprint interfaces before, but not for multiplayer, and I’m uncertain how to structure this.

I was thinking of a custom, run on server event that sends and interface message with the variables to the vehicle BP, but I’m just throwing darts here!

Store the variables on your player controller blueprint. Anything you want to persist through pawns should be on the player controller because it always exists even when not possessing

Thanks for the reply, I will try this out