Spawn Points

Spawn Points are objects placed in the scene to determine where the player will spawn when joining the game and when respawning in the game.

Note: A game can have a single Spawn Point even if more than one player can join the game. The Spawn point is not linked to a player but just information for the engine to know where to spawn a player.

Properties of Spawn Points

A Spawn Point can be customized in the Properties window. There are five properties available:

  • Team: the number of the team, useful for FPS or any versus game where players are part of a team, either 1 or 2 if the game has two teams.
  • Key: a useful tag that can be used in a script to spawn the player at a Spawn Point. (if a value is set, the Spawn Point won’t be used by the default spawning system)
  • Decrowd Players: Spawned players will be checked for collision to avoid overlapping.
  • Player Scale Multiplier: the scale applied to the player when spawned (1 by default)
  • Spawn Template: a template spawned each time the player spawns. Most of the time a visual effect and sound effect.

A template has been created with a Fire Ring effect. After creating the template, drag & drop it in the Spawn Template property to assign it. This will create an effect like the gif on the right at each spawn of a player. You must define a Lifespan on this kind of template to remove the object after a few seconds. 3 seconds seems like a good value here to ensure that the effect is finished.

Try it on Core! Create a template with the “Explosion Kit Fire Ring VFX” VFX and assign it to the Spawn Template value. You can also add a sound effect in your template. Add a Lifespan to your template to remove the template after a few seconds.

Spawn Settings

In multiplayer games where people can defeat the other players, you must define how players will spawn on the map. Should they all spawn at a single Spawn Point or is a Spawn Point randomly chosen based on the placement of the enemies? You can define that in the Properties of the Spawn Settings object.

  • Start Spawned: when enabled, the player is automatically spawned when they join the game. If this option is disabled, you will need to spawn the players from a script.
  • Spawn Key/Respawn Key: if you want your player to spawn in the lobby, you can set the Key to “Lobby” in a Spawn Point and set the same value in the Spawn Key.
  • Respawn Delay: number of seconds before the player is automatically respawned (if the Respawn Mode is set to any value except None).
  • Spawn Mode/Respawn Mode: these properties define how players will spawn and respawn. Keep your cursor on the name in the Property window to get more information about each mode.

Try it on Core! Add a Spawn Point with the key “Lobby” in the blue zone and add this Key in the Spawn Key property of the Spawn Settings. Add another Spawn Point without any key in the green zone. Your player must spawn in the blue area and if he goes in the red one, the character will die and respawn in the green one.

The result of the “Try it on Core!”
Post a comment

Leave a Comment

Scroll to Top