# Spawning and respawning

The Morpheus platform has some helper functionality to control where players spawn into the world, which can be especially useful in experiences with large numbers of players.

### J\_PlayerStartVolume

You can use `J_PlayerStartVolume` actors to automatically create multiple player start actors. Set the EQ query to control the layout of the start actors. By default it will create `PlayerStart` actors but you can select any subclass to spawn instead, for example to support a team game with different spawn point classes for each team.

<figure><img src="/files/Rjt7XmNTrCHhNDSpwpyN" alt=""><figcaption></figcaption></figure>

### Customising the spawning behavior

By default all `PlayerStart` actors in the level are shuffled into a random order, and each new player spawn will use the next one in the list, cycling through.

You can completely replace this behavior by overriding `M2_GameMode::M2ChoosePlayerStart` to add any custom logic:

<figure><img src="/files/6hke0tiBhup35rkSWBQC" alt=""><figcaption></figcaption></figure>

### Preferred start volumes

If you don't want to completely replace the spawning behavior, the default `M2_GameMode` behaviour supports "preferred start volumes". You can call `M2_GameMode::SetPreferredPlayerStartVolumes` to restrict spawning to the start points of specific start volumes.

<figure><img src="/files/DPONHrM2GfSmv9rWDeqC" alt=""><figcaption></figcaption></figure>

For example in a live narrative event, you may wish late joining players to spawn (or respawn) in the currently active part of the level. Call this on the server to affect the spawn position of all subsequent joiners.

### Respawning

The base Morpheus character classes don't have a built-in respawn function, but it is easy to implement in Blueprint by simply finding a start point and teleporting the player. To respawn using the same logic as if the player has left and re-joined you could use this:

<figure><img src="/files/z9BhqRV9aFIeBsyFjY0k" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.msquared.io/creation/unreal-development/features-and-tutorials/spawning-and-respawning.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
