# Spawn API

Blueprint nodes used to query, filter, and evaluate spawn points.

### Spawn Resolution

| Node                                       | Description                                                               |
| ------------------------------------------ | ------------------------------------------------------------------------- |
| **Find Spawn Transform For Player**        | Finds a valid spawn transform for a player using the current spawn rules. |
| **Find Any Start Point**                   | Finds any valid start point from the available spawn lists.               |
| **Find Nearest Any Player**                | Finds a spawn point nearest to any player.                                |
| **Farthest Any Player**                    | Finds a spawn point farthest from all players.                            |
| **Team Start Point**                       | Finds a spawn point using team-based spawn logic.                         |
| **Near Player Team**                       | Finds a spawn point close to allied players.                              |
| **Farther Player Team**                    | Finds a spawn point farther from allied players.                          |
| **Find Spawn Point From Player**           | Builds a spawn transform from player locations only.                      |
| **Get Random Point In NavMesh For Player** | Returns a random valid point on the navmesh.                              |

### Start Point Queries

| Node                                      | Description                                               |
| ----------------------------------------- | --------------------------------------------------------- |
| **Get Reality Default Player Start**      | Returns all default player starts in the current world.   |
| **Get Reality Player Start**              | Returns all custom player starts in the current world.    |
| **Hard Get Reality Player Default Start** | Performs a direct world lookup for default player starts. |
| **Hard Get Reality Player Start**         | Performs a direct world lookup for player starts.         |

### ID Filters

| Node                                     | Description                                      |
| ---------------------------------------- | ------------------------------------------------ |
| **Get Reality Player Start With ID**     | Returns player starts matching a specific ID.    |
| **Get Reality Player Start With IDs**    | Returns player starts matching any ID in a list. |
| **Filter Reality Player Start With IDs** | Filters an existing player start list by ID.     |

### Tag Filters

| Node                                                    | Description                                                 |
| ------------------------------------------------------- | ----------------------------------------------------------- |
| **Get Reality Player Start With Actor Tag**             | Returns player starts with a specific actor tag.            |
| **Get Reality Player Start With Actor Tags**            | Returns player starts matching any actor tag in a list.     |
| **Filter Reality Player Start With Actor Tags**         | Filters an existing player start list by actor tags.        |
| **Get Reality Player Start With Actor Tags And IDs**    | Returns player starts matching both tags and IDs.           |
| **Filter Reality Player Start With Actor Tags And IDs** | Filters an existing player start list by both tags and IDs. |

### Player Queries

| Node                                  | Description                                                  |
| ------------------------------------- | ------------------------------------------------------------ |
| **Get Reality Player Characters**     | Returns all active reality player characters.                |
| **Split Player By Team**              | Splits a player list into team members and non-team members. |
| **Get Reality Transform From Player** | Converts a player list into a list of transforms.            |
| **Get Reality Player Controllers**    | Returns all reality player controllers in the current world. |

### Distance and Team Evaluation

| Node                                                | Description                                              |
| --------------------------------------------------- | -------------------------------------------------------- |
| **Filter Player Start By Team**                     | Filters player starts using one or more allowed teams.   |
| **Find Reality Start Nearest Player**               | Returns the custom player start nearest to players.      |
| **Find Reality Default Start Nearest Player**       | Returns the default player start nearest to players.     |
| **Sort Reality Start Nearest Player**               | Sorts custom player starts by distance to players.       |
| **Sort Reality Default Start Nearest Player**       | Sorts default player starts by distance to players.      |
| **Find Spawn Point Nearest Player**                 | Finds a spawn transform nearest to players.              |
| **Find Reality Start Farthest From Player**         | Returns the custom player start farthest from players.   |
| **Find Reality Default Start Farthest From Player** | Returns the default player start farthest from players.  |
| **Find Reality Start Best For Team**                | Finds the best custom player start for a team.           |
| **Find Reality Start Hidden From Player**           | Returns player starts hidden from the specified players. |

### Availability and Occupancy

| Node                                     | Description                                                     |
| ---------------------------------------- | --------------------------------------------------------------- |
| **Get Available Reality Starts**         | Returns custom player starts currently available for spawning.  |
| **Get Available Reality Default Starts** | Returns default player starts currently available for spawning. |
| **Mark Reality Start Occupied**          | Marks a default player start as occupied.                       |
| **Reset Mark Reality Start Occupied**    | Clears occupied state on default player starts.                 |
| **Get Overlap Start Point**              | Checks whether a default player start is currently overlapped.  |

### Random Utilities

| Node                                 | Description                                    |
| ------------------------------------ | ---------------------------------------------- |
| **Get Random Reality Start**         | Returns a random custom player start.          |
| **Get Random Reality Default Start** | Returns a random default player start.         |
| **Shuffle Player Start**             | Randomizes the order of custom player starts.  |
| **Shuffle Default Player Start**     | Randomizes the order of default player starts. |

### Spawn Adjustment

| Node                                            | Description                                                      |
| ----------------------------------------------- | ---------------------------------------------------------------- |
| **Evaluate Derived Spawn Point From Transform** | Adjusts a base transform to find a better valid spawn transform. |

***

### Recommended Flow

Use **Find Spawn Transform For Player** first for standard spawn logic.\
For custom setups, combine start point queries, filters, availability checks, and transform adjustment nodes.


---

# 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://beyond-sandbox.gitbook.io/realitysdk/documentation/gamemode/spawn-api.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.
