For my VR game I have a main map with two players. These players are linked to a path and not able to control. When you enter the main map it’s like you move like a train, you can activate actors by looking around. Both players have their own programmed path.
When you are in the lobby and you select to play the game, the main map will be loaded. From this point I want to determine which player I like to select. When you join the main map from the lobby, you always start with player_01
The game has minigames, you can select these in the main map. When you complete the mini game, I like to return to the main map, but now using player_02. The reason is player_01 is only used to introduce the main map and follows a different track.
I know how to select the player in the main map, but selecting the player in a different level is a bit complicated.
Any thoughts on this to realize ? i was thinking to make a reference to the gameinstance, not sure how to work this out.
by player im assuming that your just talking about pawns here and its not a multiplayer game. theres three methods that come to mind the posses node, game mode override, and the auto posses settings. you can take control of a pawn at any time by using the posses node, but you will have to have script to run it. game mode override settings allow you to change the default pawn on a per level basis so level 1 could use one pawn and level two a different one. in your case you could have the main level override the game mode to use player 01. the last one auto posses allows you to place a pawn in the level then set if you wish to posses that pawn at the beginning of the level instead of the default pawn.
it seems like your trying to posses the player01 on game start but never again after that. for something like that you could use a bool (fistplay?)value in the game instance and a little script in the level bp which says on begin play → get bool (firstplay?)from game instance → if true posses player01, if false posses player02. then have the rest of the levels just use the player02 by default.
Thats right, i talked about pawns and it is not a multiplayer game. Pawn_01 is only used once, after that i only use pawn_02. i will try the boolean setup, seems like a solid solution.