Difference between revisions of "Engine.SpawnPlayer"
Jump to navigation
Jump to search
(Created page with "== Function == <syntaxhighlight lang="javascript"> function Engine.SpawnPlayer(player); function Engine.SpawnPlayer(player, x, y, z, rotation); </syntaxhighlight> == Argumen...") |
|||
Line 3: | Line 3: | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
function Engine.SpawnPlayer(player); | function Engine.SpawnPlayer(player); | ||
− | function Engine.SpawnPlayer(player, x, y, z, rotation); | + | function Engine.SpawnPlayer(player, room, x, y, z, rotation, startingHealth = 1000); |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 13: | Line 13: | ||
== Optional Arguments == | == Optional Arguments == | ||
+ | * room | ||
+ | ** The room index the player should spawn in. | ||
* x | * x | ||
** The x position to spawn at. | ** The x position to spawn at. | ||
Line 21: | Line 23: | ||
* rotation | * rotation | ||
** The rotation to spawn with. | ** The rotation to spawn with. | ||
+ | * startingHealth | ||
+ | ** The starting health the player will spawn with, 1000 is full health. | ||
== Notes == | == Notes == |
Revision as of 03:09, 9 August 2014
Function
function Engine.SpawnPlayer(player);
function Engine.SpawnPlayer(player, room, x, y, z, rotation, startingHealth = 1000);
Arguments
- player
- The player to spawn.
Optional Arguments
- room
- The room index the player should spawn in.
- x
- The x position to spawn at.
- y
- The y position to spawn at.
- z
- The z position to spawn at.
- rotation
- The rotation to spawn with.
- startingHealth
- The starting health the player will spawn with, 1000 is full health.
Notes
Calling Engine.SpawnPlayer with only the player will just respawn the player in the same position and rotation.
Calling Engine.SpawnPlayer will create a new player this means that your inventory will be reset.