API > MLStation
MLStation
MLStation component provides a mean to attach players to another object. The most common use for this is creating a seat. When attached to the station, the player loses its movement abilities, but still can move their head and hands. Using the Lua, the player controller inputs can be accessed and used to drive vehicles.
Members
Properties
Name |
Description |
MLStation .IsOccupied |
True if there is a player attached to the station. (Read only) |
MLStation .Lock |
Sets or gets the station lock. If the station is locked, the players cannot enter or exit the station. While locked, a player still can be attached or detached to the station using Lua script. |
MLStation .OnPlayerLeft |
Event that triggers when a player leaves (detaches) the station. |
MLStation .OnPlayerSeated |
Event that triggers when a player gets attached to the station. |
Methods
Name |
Description |
MLStation .GetInput() |
Returns the current players controller inputs. Note that this function returns the controller inputs for the local player, so only the client which the current player is local can access the inputs. |
MLStation .GetPlayer() |
Gets the MLPlayer object of current station occupant. Returns null if the station is empty. |
MLStation .RemovePlayer() |
Removes (detaches) the current player from station if there is any. |
MLStation .SettlePlayer(player) |
Attaches the given player to the station. Ignores if the station is occupied. |
Inherited Members
Inherited Properties
Name |
Description |
MLStation .gameObject |
The game object this component is attached to. A component is always attached to a game object. |
MLStation .tag |
The tag of this game object. |
MLStation .transform |
The Transform attached to this GameObject. |
MLStation .hideFlags |
Should the object be hidden, saved with the Scene or modifiable by the user? |
MLStation .name |
The name of the object. |
Inherited Methods