Possess on join

How would i go about making Players possess pawns automatically when they join, so the first player to join will take player1, second player2 ,third player3 etc.

i just cant seem to figure it out

modified from the multiplayer shootout tutorial from epic.

change the OnPossess event to the real built-in EventOnPossess if needed.

Sorry for the late response ill give it a try

Im assuming PS_Player and PC_Maze are assets for your game, what would these be for my game?

Sorry if its not understandable. i get lost on my own BPs sometimes. ill try to explain how i would simplify my example to your needs (this explanation will differ a lot from the screenshot, so try to picture this first, then see the screnshot again):

  • you could start with an Event beginPlay. you get all the actors of class PlayerStart, lets assume (contrary to my example) that you have 4. store that into an array inside the Gamemode BP.
  • on this same blueprint, you have a variable CurrentPlayerStartIndex.

All this will be on 1 same event (Event onPostLogin):

  • Event onPostLogin is a built-in. after a client logs in (the switch is pretty unnecesary, this happens in Gamemode anyways) you can just get the PlayerStart on Index == CurrentPlayerStartIndex.
  • Increment 1 to the CurrentPlayerStartIndex.
  • After you got the PlayerStart, do a SpawnActor of the class you want (assume FirstPersonCharacter class). you use the transform from the Player Start.
  • Take the reference and do a Possess (Target is the initial reference from Event onPostLogin)

and that should be enough if you wanna cover the basic. why i did so much bullsh…optimization on mine? its only for 2 and i want it to be like that…player 1 on spot of player 1, player 2 on spot of player 2. this explanation above sets the players depending on who logs first.

probably nothing, as i call the controller and state for different reasons. like i posted at the beginning, this is for my game, so some nodes would be not needed for you. please refer my other comment to understand the core of the logic

ok thanks , and I didn’t mean to ask the question twice i accidentally deleted the first one