OnInteract |
function Script:OnInteract(Entity player, HitResult hitResult) ... end |
Called when a player interacts with an entity on all scripts of the entity. |
Server Only |
OnCollision |
function Script:OnCollision(Entity collidingPlayerOrEntity) ... end |
Called when a player collides with an entity on all scripts of the entity. Also calls this function on the player's scripts with the entity as the argument. |
Server Only |
OnDamage |
function Script:OnDamage(number damageAmount, Entity damageCauser, HitResult hitResult) ... end |
Called when an entity is damaged on all scripts of the entity. |
Server Only |
Init |
function Script:Init() ... end |
Called to initialize a script on the server. |
Server Only |
ClientInit |
function Script:ClientInit() ... end |
Called to initialize a script on the client. |
Client Only |
LocalInit |
function Script:LocalInit() ... end |
Called to initialize a script on the client that controls this entity (eg player, user, etc...) |
Local Only |
OnTick |
function Script:OnTick(number deltaTimeSeconds) ... end |
Called each frame on the server. |
Server Only |
ClientOnTick |
function Script:ClientOnTick(number deltaTimeSeconds) ... end |
Called each frame on the client. |
Client Only |
LocalOnTick |
function Script:LocalOnTick(number deltaTimeSeconds) ... end |
Called each frame on the client that controls this entity (eg player, user, etc...) |
Local Only |
OnUserLogin |
function Script:OnUserLogin(User user) ... end |
Called when a new user joins the game. |
Server Only |
OnUserLogout |
function Script:OnUserLogout(User user) ... end |
Called when a new user leaves the game. |
Server Only |
OnDeathPlaneTrigger |
function Script:OnDeathPlaneTrigger() ... end |
Called by the game on a Player when the Player is below the death plane setting |
Server Only |
OnTriggerEnter |
function Script:OnTriggerEnter(Entity other) ... end |
Called by a trigger component when an entity enters the trigger volume |
Server Only |
OnTriggerExit |
function Script:OnTriggerExit(Entity other) ... end |
Called by a trigger component when an entity exits the trigger volume |
Server Only |
OnButtonPressed |
function Script:OnButtonPressed(string buttonName) ... end |
Called on player and user scripts when a particular button is pressed, giving the string name of the button |
Server Only |
OnButtonReleased |
function Script:OnButtonReleased(string buttonName) ... end |
Called on player and user scripts when a particular button is released, giving the string name of the button |
Server Only |
OnIronSightStart |
function Script:OnIronSightStart() ... end |
Called when the character goes in to Iron Sight mode |
Server Only |
OnIronSightStop |
function Script:OnIronSightStop() ... end |
Called when the character stops Iron Sight mode |
Server Only |
OnSprintStart |
function Script:OnSprintStart() ... end |
Called when the character starts sprinting |
Server Only |
OnSprintStop |
function Script:OnSprintStop() ... end |
Called when the character stops sprinting |
Server Only |
OnCrouch |
function Script:OnCrouch() ... end |
Called when the character crouches |
Server Only |
OnStand |
function Script:OnStand() ... end |
Called when the character stands from crouch |
Server Only |
OnJump |
function Script:OnJump() ... end |
Called on the player when a jump action happened |
Server Only |
LocalOnButtonPressed |
function Script:LocalOnButtonPressed(string buttonName) ... end |
Called locally on player and user scripts when a particular button is pressed, giving the string name of the button |
Local Only |
LocalOnButtonReleased |
function Script:LocalOnButtonReleased(string buttonIndex) ... end |
Called locally on player and user scripts when a particular button is released, giving the string name of the button |
Local Only |
LocalOnIronSightStart |
function Script:LocalOnIronSightStart() ... end |
Called when the character goes in to Iron Sight mode |
Local Only |
LocalOnIronSightStop |
function Script:LocalOnIronSightStop() ... end |
Called when the character stops Iron Sight mode |
Local Only |
LocalOnSprintStart |
function Script:LocalOnSprintStart() ... end |
Called when the character starts sprinting |
Local Only |
LocalOnSprintStop |
function Script:LocalOnSprintStop() ... end |
Called when the character stops sprinting |
Local Only |
LocalOnCrouch |
function Script:LocalOnCrouch() ... end |
Called when the character crouches |
Local Only |
LocalOnStand |
function Script:LocalOnStand() ... end |
Called when the character stands from crouch |
Local Only |
LocalOnJump |
function Script:LocalOnJump() ... end |
Called on the player when a jump action happened |
Local Only |
OnHotbarChanged |
function Script:OnHotbarChanged(number hotbarIndex) ... end |
Called on server when the user's hotbar index changes, either by using the previous and next buttons or using the hotbar keys on a keyboard. Calls function on all user and player scripts. |
Server Only |
OnChatMessage |
function Script:OnChatMessage(User user, Text message) ... end |
Called when a quick chat message is triggered by a user |
Client Only |
OnDestroy |
function Script:OnDestroy() ... end |
Called on the server when an entity is destroyed |
Server Only |
LocalOnMantleStart |
function Script:LocalOnMantleStart() ... end |
Called when the character starts to mantle up to a platform |
Local Only |
OnMantleStart |
function Script:OnMantleStart() ... end |
Called when the character starts to mantle up to a platform |
Server Only |
LocalOnMantleStop |
function Script:LocalOnMantleStop() ... end |
Called when the character stops to mantling up to a platform |
Local Only |
OnMantleStop |
function Script:OnMantleStop() ... end |
Called when the character stops to mantling up to a platform |
Server Only |
LocalOnSlideStart |
function Script:LocalOnSlideStart() ... end |
Called when the character starts to slide |
Local Only |
OnSlideStart |
function Script:OnSlideStart() ... end |
Called when the character starts to slide |
Server Only |
LocalOnSlideStop |
function Script:LocalOnSlideStop() ... end |
Called when the character stops sliding |
Local Only |
OnSlideStop |
function Script:OnSlideStop() ... end |
Called when the character stops sliding |
Server Only |
LocalOnRollStart |
function Script:LocalOnRollStart() ... end |
Called when the character starts to roll |
Local Only |
OnRollStart |
function Script:OnRollStart() ... end |
Called when the character starts to roll |
Server Only |
LocalOnRollStop |
function Script:LocalOnRollStop() ... end |
Called when the character stops rolling |
Local Only |
OnRollStop |
function Script:OnRollStop() ... end |
Called when the character stops rolling |
Server Only |
LocalOnSpawnEffectEnded |
function Script:LocalOnSpawnEffectEnded() ... end |
Called when the character spawn effect has ended |
Local Only |
OnSpawnEffectEnded |
function Script:OnSpawnEffectEnded() ... end |
Called when the character spawn effect has ended |
Server Only |
OnActivityTriggered |
function Script:OnActivityTriggered(string id, text display, string category) ... end |
Called when an activity is triggered |
|
OnFirstPersonStarted |
function Script:OnFirstPersonStarted() ... end |
Called when the local camera enters first person mode |
Local Only |
OnFirstPersonEnded |
function Script:OnFirstPersonEnded() ... end |
Called when the local camera exits first person mode |
Local Only |