How to make different spawnpoints for multiplayer game


I finally have almost perfected my multiplayer game except,

when I start up the game the players spawn in the same spot, which causes them to get stuck together.

If someone could screenshot me the blueprints to fix this, that would be great (no meme intended).

Here’s my multiplayer blueprints so far:

Hi EdgeTech1,

Can’t see your screenshot but here is an easy implementation. Duplicate your level’s Player Start or add some more (for this method you will need to have as many Player Starts as your maximum player value). When you have them in the positions you want
Then, in your game mode add a version of this:

As it is all in the game mode, no server checks are needed, as it is only serverside. If you want random ones, you would just extend this by making your Player Starts a new class with a collision volume. Then select a random Spawn Point from the array, check if its occupied, if its empty of player characters, then you can spawn, else select another random point. Let me know if that was helpful.

Hello User609571414!

I tried to use your method, but a lot of the node when I try to connect them say that they aren’t compatible.

What do I need to do?


P.S. Just wondering, have you made any finished/work in progress games yet? You don’t have to tell me if you prefer not to.

Ok, well there are only three variable types there. So . . .

SpawnPointsArray of type “Player Start” and make it an array.
PlayersArray of type “PlayerController” and make it an array.
CharactersArray of type “whatever your character class is
Also make sure you are getting the Array versions of the ‘Get(a ref)’ and ‘Add’ nodes, it will not work with the Map/Set versions.

Are you using player controllers? If not you will have to adjust the code slightly.

And yes, sort of . . . I have worked on a few games (in part) that never shipped, some VR stuff, and i’m currently “working”, both in collaboration and solo on a couple of projects.

Hello User609571414!

Your method works except one (kinda two) problems.

1: The GetActorTransform target will not connect to the GET node.

(Kinda 2): When I start the game, the server spawns just fine, but the client spawns on the bottom of the map and falls to its death (even though the clients spawnpoint is set on top of the map, next to the server player).

Thank you so much!!!

Ok, if the “Get Actor Transform” is not connecting, then you may need check your PlayerControllerArray and Your Player Start Array variable type. Also ensure your on Event BeginPlay → GetAllActorsOfClass is getting “Player Start”. If it is correct then see what does the mouse tooltip say when you hover the “GetActorTransform” wire over the “Get” node’s pin?

The second problem is your character is not receiving the correct transform, they are linked problems, it is presumably spawning at your Map’s Origin point, 0, 0, 0.

You may need to debug what the arrays are receiving, almost certainly the Player Start Array. You can just hook the Player Start Array up to a “Get Actor Location” node and then put the vector into a “Print String” (increase its duration) on the end of the On EventPostLogin execution, also do the same for the spawned character output from the “SpawnActor” node.
If that returns the correct location for your Player Starts as they receive their spawned player . . . then its something else. IF any of the vectors don’t match, or are 0, 0, 0 . . . Post a screenshot of your code.

Ok, here’s my code:


Also when I do scroll over the GetActorTransform to the GET node, it says Actor Object Reference is not compatible with Object Object Reference.


Hi EdgeTech1,

I hadn’t realised it was a 2D project, i should also mention this is not a local multiplayer setup . . . So i did have to make a slight adjustment. But it doesn’t change the problem you are having. If it is saying Object Object Reference, then something is not right with the Spawn Point array.
So i used a default 2D Sidescroller project and set it up as displayed below, was all working.

Step 1 add Player Starts.

Step 2: In 2D Character change 2 nodes.

Step three add the following to your game mode.

I’m not very familiar with 2D template, not sure at the moment why it was spawning incorrectly on the server, if anyone else knows.