Difference between revisions of "Player (Re)spawn"
(Created page with "= Player (Re)Spawn = This page aims to show you how to handle spawning and respawning of players. This can be done through checkpoints, that also manage health and mission st...") |
(No difference)
|
Latest revision as of 10:11, 15 June 2018
Player (Re)Spawn
This page aims to show you how to handle spawning and respawning of players. This can be done through checkpoints, that also manage health and mission starting and a lot of things, but also respawn components
Checkpoints
Checkpoints can be found under the InstanceBase->Entity->GamePlayEntity->CheckPointEntity tree. There are three types of checkpoint with different skins (but they basicaly do the same thing), InvisibleCheckpointEntity, SwampCheckpointEntity (light green) and WitchCheckpointEntity (dark blue).
Placing a checkpoint will have the player spawn by default at this point. With several checkpoints, the initial starting spot can be enabled by enabling the MissionStartCheckpoint property under TrineCheckpointComponent.
Be sure that the box area surounding the checkpoint is on the player's path. If you want to place the checkpoint away from the player's path, for instance if you want to put it deeper in the background, make sure you changed the Dimensions property of the BoxAreaComponent in the property panel accordingly.
You can set the HardcoreModeActivationTimes property if you think that this checkpoint should be accessible several times in hardcore mode.
RespawnPointHelperEntity
Place a RespawnPointHelperEntity where you would like the players to respawn if they die. Try to place it to a safe location where the player will not be killed right again. The RespawnPointHelperEntity needs a RespawnArea to function.
RespawnArea
A respawn area is a area that once triggered (entered), will set the respawn point of the player to the linked RespawnPointHelperEntity. Place the RespawnArea entity, and a RespawnPointHelperEntity where you would like the players to respawn if they die in this area (or until the next RespawnArea). Change the Dimensions property of the BoxAreaComponent to fit the zone where this RespawnPointHelperEntity will be active.
Now you have to link the RespawnArea with the RespawnPointHelperEntity. Go to the TrineRespawnComponent in the RespawnArea's property panel, and click on the + sign for the ListOfRespawnPoints property. Click the ... button and select your RespawnPointHelperEntity that should appear under the "Recent Objects" tab. The two objects are now linked, and a green arrow should appear in the 3D view confirming it.
--LeonardA-L (talk) 20:31, 4 March 2015 (UTC)