Let me explain what I want to do first. I’m writing with blueprints
(1) I’m writing a 2 player fighting game which has four heroes. The player has to choose a hero first then will be loaded into a map.
(2) Server player chose the hero, hosts the game and loads into the map. Everything is ok.
(3) The client player has to choose the hero before joining the session. Then joins the session and loads into the map of server player.
(4) To store which hero is chosen by client, I stored the index of hero into a variable named P2Hero in playerState blueprint.( This step occurs before joining the session )
(5) After joining the session, and onPostLogin event, I want to get back the saved ** P2Hero** variable from client’s playerState blueprint but it seems like it is getting the variable from another playerState blueprint and just gives the default value of the variable 0.
(6) My main point is how to save datas of client before joining the session and how to load them back after joining the session.
Someone pls help me. I’m having a really big trouble. I’ve tried saving the data in gameInstance, gameMode, playerController. All of them just gives the default value like mentioned above. May be the whole logic of mine is wrong. If wrong pls point me how to solve this problem. Thanks.