Spawning duplicates problem (multiplayer game)
I have a spawning system in my multiplayer game prototype. (I followed this tutorial: https://www.youtube.com/watch?v=3lN2eZIgAQ0∈dex=161&list=PL1mAlSL892EumWuBcRGa6WDW6lQNvlPsk&t=1s)
And in the tutorial he has a problem with duplicates spawning at the same point. His fixes the problem by setting the default pawn class to None. However, when I do this this no player spawns.
3 Spawn points.
2 Online players, but 6 characters spawned.
GameMode blueprint (spawning players for each spawn point in the world).
But when I set the default pawn class to none...
The player doesn't posses any of the spawned characters.
asked Feb 07 '19 at 06:46 PM in Blueprint Scripting
Remove the Instigator in your SpawnActorOfClass. Also add Delay of 0.2 before you possess to make sure your pawn has initialized properly enough before posessing it.
What I would do differently is, add PlayerIndex inside your pawn. After spawning it in your GameMode, set your pawn's PlayerIndex. And then on your pawn's BeginPlay, i'll move the CreatePlayer node there and then possess it based on PlayerIndex. That way you dont have to put the Delay node.
Follow this question
Once you sign in you will be able to subscribe for any updates here