namespace ML.SDK
Class
MLStation
namespace ML.SDK
{
class MLStation
}
Inherits from MonoBehaviour
Summary
Fields
Field | Desciption |
---|---|
IsDriverSeat | [Pre-Built effect only] Is this station setup as driver seat. |
enableOutline | |
OnPlayerLeft | Event that triggers when a player leaves (detaches) the station. |
OnPlayerSeated | Event that triggers when a player gets attached to the station. |
Properties
Property | Desciption |
---|---|
IsOccupied | True if there is a player attached to the station. (Read only) |
Locked | 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. |
Methods
Method | Description |
---|---|
MountLocalPlayer() | Mount the local player to this station, if station is not occupied |
RemoveLocalPlayer() | Remove local player from this if they are sitting |
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. |
GetStationInput() | 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. |
GetPlayer() | Gets the MLPlayer object of current station occupant. Returns null if the station is empty. |
RemovePlayer() | Removes (detaches) the current player from station if there is any. |
SettlePlayer(MLPlayer) | Attaches the given player to the station. Ignores if the station is occupied. |