Skip to content

Player

Variables

transform

Player.transform

Variable holding the player's Transform reference

Example
Player.transform

gameObject

Player.gameObject

Variable holding the player's GameObject reference

Example
Player.gameObject

saveSlot

Player.saveSlot

Variable holding the player's current character save slot.

Example
Player.saveSlot

energy

Player.energy

Variable holding the player's energy in an Int data type. Energy is used for planting, collecting flowers and etc.

Example
Player.energy

maxEnergy

Player.maxEnergy

Variable holding the player's max Energy in an Int data type

Example
Player.maxEnergy

health

Player.health

Variable holding the player's health in an Int data type

Example
Player.health

maxHealth

Player.maxHealth

Variable holding the player's max Health in an Int data type

Example
Player.maxHealth

stamina

Player.stamina

Variable holding the player's stamina in a float data type. Stamina is used for swimming.

Example
Player.stamina

maxStamina

Player.maxStamina

Variable holding the player's max Stamina in an Int data type

Example
Player.maxStamina

currency

Player.currency

Variable holding the player's currency in an Int data type.

Example
Player.currency

isSwimming

Player.isSwimming

Variable that returns true if the player is swimming at the moment.

Example
Player.isSwimming

isGliding

Player.isGliding

Variable that returns true if the player is gliding at the moment.

Example
Player.isGliding

Functions

GetLocalPlayerSyncer

 function Player.GetLocalPlayerSyncer()

Player.GetLocalPlayerSyncer

Returns the local Player Syncer.

Example
LocalSyncer = Player.GetLocalPlayerSyncer()

GetAllPlayerSyncers

 function Player.GetAllPlayerSyncers()

Player.GetAllPlayerSyncers

Returns all the Player Syncers.

Example
AllSyncers = Player.GetAllPlayerSyncers()

IgnoreColliders

 function Player.IgnoreColliders((GameObject)GameObject to ignore)
Parameter Type 📝 Description
GameObject to ignore GameObject Game object we want our player to ignore.

Player.IgnoreColliders

Makes the player ignore the colliders of a GameObject.

Example
Player.IgnoreColliders(newGameObject)

StopIgnoringColliders

 function Player.StopIgnoringColliders((GameObject)GameObject to stop ignoring)
Parameter Type 📝 Description
GameObject to stop ignoring GameObject Game object we want our player to stop ignoring.

Player.StopIgnoringColliders

Makes the player stop ignoring the colliders of a GameObject.

Example
Player.StopIgnoringColliders(newGameObject)

SetShouldRun

 function Player.SetShouldRun((bool)Should Run)
Parameter Type 📝 Description
Should Run bool Set to true if the player should be running, false if the player shouldn't be running. If it's true it overrides whatever was done with the run button.

Player.SetShouldRun

Set wether the player should be running.

Example
Player.SetShouldRun(true)

SetCameraOrbit

 function Player.SetCameraOrbit((int)Camera Rig Index , (float)Camera Height, (float)Camera Radius)
Parameter Type 📝 Description
Camera Rig Index int index of the Camera Rig we're setting 0 is top, 1 is middle and 2 is bottom.
Camera Height float Desired Height for the camera, default for the top rig is 6.74, middle rig 1.26 and bottom rig is -1.66.
Camera Radius float Desired Radius for the camera, default for the top rig is 2.12, middle rig 4.58 and bottom rig is -5.74.

Player.SetCameraOrbit

Set the camera orbit.

Example
Player.SetCameraOrbit(0,1,5)

SetCameraOffsetX

 function Player.SetCameraOffsetX((float)Camera Offset X)
Parameter Type 📝 Description
Camera Offset X float Desired Camera Offset X, default is 0.5 for middle.

Player.SetCameraOffsetX

Set the Camera Offset X position.

Example
Player.SetCameraOffsetX(0.5)

SetCameraOffsetY

 function Player.SetCameraOffsetY((float)Camera Offset Y)
Parameter Type 📝 Description
Camera Offset Y float Desired Camera Offset Y, default is 0.5 for middle.

Player.SetCameraOffsetY

Set the Camera Offset Y position.

Example
Player.SetCameraOffsetY(0.5)

Comments