Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface YEvent

Hierarchy

  • YEvent

Index

Methods

Methods

onActivate

  • onActivate(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onActivate(triggerEntity) {
        // your code here
    }
    

    Called whenever a trap is activated.

    Parameters

    Returns void

onActivateInHotbar

  • onActivateInHotbar(triggerEntity: YEntity, targetEntity: YEntity): void
  • onActivateInHotbar(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onActivateInHotbar(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when entity is activated in player's hotbar.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onActivateInHotbar(triggerEntity) {
        // your code here
    }
    

    Called when entity is activated in player's hotbar.

    Parameters

    Returns void

onActivateTrap

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onActivateTrap(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when player activates a trap.

    Parameters

    Returns void

onAirtankDepleted

  • onAirtankDepleted(triggerEntity: YEntity, targetEntity: YEntity): void
  • onAirtankDepleted(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onAirtankDepleted(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when an airtank is depleted.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onAirtankDepleted(triggerEntity) {
        // your code here
    }
    

    Called when an airtank is depleted.

    Parameters

    Returns void

onAnimatorCycleEnd

  • //@YEvent
    /** @type {(obj: YEntity | YLogic | YGroup) => void} */
    function onAnimatorCycleEnd(obj) {
        // your code here
    }
    

    Called at the end of the animator cycle.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(animator: YLogic, obj: YEntity | YLogic | YGroup) => void} */
    function onAnimatorCycleEnd(animator,obj) {
        // your code here
    }
    

    Called at the end of the animator cycle.

    Parameters

    Returns void

onAnswered

  • //@YEvent
    /** @type {(answer: number, questioner: YEntity, player: YCharacter) => void} */
    function onAnswered(answer,questioner,player) {
        // your code here
    }
    

    Called when a dialogue question is answered by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(answer: string, questioner: YEntity, player: YCharacter) => void} */
    function onAnswered(answer,questioner,player) {
        // your code here
    }
    

    Called when the question in Ask Player dialogue is answered by player.

    Parameters

    Returns void

onAskPlayerAnswered

  • //@YEvent
    /** @type {(askPlayer: YUiAskPlayerWindow, answer: string, questioner: YEntity, player: YCharacter) => void} */
    function onAskPlayerAnswered(askPlayer,answer,questioner,player) {
        // your code here
    }
    

    Called when a player enters an answer into an input prompt.

    Parameters

    Returns void

onAttack

  • //@YEvent
    /** @type {(targetEntity: YEntity, attackType: YNpcAttackType) => void} */
    function onAttack(targetEntity,attackType) {
        // your code here
    }
    

    Called when an NPC performs an attack.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(type: YNpcAttackType) => void} */
    function onAttack(type) {
        // your code here
    }
    

    Called when an NPC performs an attack.

    Parameters

    Returns void

onAttackMelee

  • //@YEvent
    /** @type {(triggerEntity: YEntity, weapon: YEntity, attackType: YPlayerAttackType, comboCount: number) => void} */
    function onAttackMelee(triggerEntity,weapon,attackType,comboCount) {
        // your code here
    }
    

    Called when a player performs a melee attack.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, attackType: YPlayerAttackType, comboCount: number) => void} */
    function onAttackMelee(triggerEntity,attackType,comboCount) {
        // your code here
    }
    

    Called when a player performs a melee attack.

    Parameters

    Returns void

onAttackRanged

  • onAttackRanged(triggerEntity: YEntity, weapon: YEntity): void
  • onAttackRanged(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, weapon: YEntity) => void} */
    function onAttackRanged(triggerEntity,weapon) {
        // your code here
    }
    

    Called when a player attacks with a ranged weapon.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onAttackRanged(triggerEntity) {
        // your code here
    }
    

    Called when a player performs a ranged attack.

    Parameters

    Returns void

onAttackRangedEnded

  • onAttackRangedEnded(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onAttackRangedEnded(triggerEntity) {
        // your code here
    }
    

    Called after player enter combat mode.

    Parameters

    Returns void

onAttackRangedEntityHit

  • //@YEvent
    /** @type {(triggerEntity: YEntity, weapon: YEntity, hitEntity: YEntity, hitPosition: YVector3) => void} */
    function onAttackRangedEntityHit(triggerEntity,weapon,hitEntity,hitPosition) {
        // your code here
    }
    

    Called when a player performs a ranged attack and projectile hits an entity.

    Parameters

    Returns void

onAttackRangedGroundHit

  • //@YEvent
    /** @type {(triggerEntity: YEntity, weapon: YEntity, hitPosition: YVector3) => void} */
    function onAttackRangedGroundHit(triggerEntity,weapon,hitPosition) {
        // your code here
    }
    

    Called when a player performs a ranged attack and projectile hits ground.

    Parameters

    Returns void

onAttackRangedMiss

  • //@YEvent
    /** @type {(triggerEntity: YEntity, weapon: YEntity) => void} */
    function onAttackRangedMiss(triggerEntity,weapon) {
        // your code here
    }
    

    Called when a player performs a ranged attack but projectile haven't hit anything.

    Parameters

    Returns void

onAttackRangedStarted

  • onAttackRangedStarted(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onAttackRangedStarted(triggerEntity) {
        // your code here
    }
    

    Called after player exits combat mode.

    Parameters

    Returns void

onAwake

  • onAwake(): void
  • //@YEvent
    /** @type {() => void} */
    function onAwake() {
        // your code here
    }
    

    Called whe the game object is loaded to world.

    Returns void

onBaitDetected

  • onBaitDetected(triggerEntity: YEntity, targetEntity: YEntity): void
  • onBaitDetected(bait: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onBaitDetected(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when animal detects a bait.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(bait: YEntity) => void} */
    function onBaitDetected(bait) {
        // your code here
    }
    

    Called when animal detects a bait.

    Parameters

    Returns void

onBaitingEnded

  • onBaitingEnded(triggerEntity: YEntity, targetEntity: YEntity): void
  • onBaitingEnded(bait: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onBaitingEnded(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called after animal baiting ended.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(bait: YEntity) => void} */
    function onBaitingEnded(bait) {
        // your code here
    }
    

    Called after animal baiting ended.

    Parameters

    Returns void

onBaitingInterrupted

  • onBaitingInterrupted(triggerEntity: YEntity, targetEntity: YEntity): void
  • onBaitingInterrupted(bait: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onBaitingInterrupted(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when animal baiting was interrupted.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(bait: YEntity) => void} */
    function onBaitingInterrupted(bait) {
        // your code here
    }
    

    Called when animal baiting was interrupted.

    Parameters

    Returns void

onBehaviourAssigned

  • //@YEvent
    /** @type {(entity: YEntity) => void} */
    function onBehaviourAssigned(entity) {
        // your code here
    }
    

    Called when the AI behaviour is assigned to a new entity.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(aiBehaviour: YAiBehaviour, entity: YEntity) => void} */
    function onBehaviourAssigned(aiBehaviour,entity) {
        // your code here
    }
    

    Called when an AI Behaviour is assigned to an entity.

    Parameters

    Returns void

onBowChargeStart

  • onBowChargeStart(triggerEntity: YEntity, weapon: YEntity): void
  • onBowChargeStart(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, weapon: YEntity) => void} */
    function onBowChargeStart(triggerEntity,weapon) {
        // your code here
    }
    

    Called when a player starts drawing a bow for a charged attack.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onBowChargeStart(triggerEntity) {
        // your code here
    }
    

    Called when a player starts drawing a bow for a charged attack.

    Parameters

    Returns void

onBreak

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onBreak(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when entity is being broken in inventory.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onBreak(triggerEntity) {
        // your code here
    }
    

    Called when entity is being broken in inventory.

    Parameters

    Returns void

onBuildFire

  • onBuildFire(triggerEntity: YEntity, targetEntity: YEntity): void
  • onBuildFire(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onBuildFire(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when entity (e. g. stick) is lit by a player and becomes a campfire.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onBuildFire(triggerEntity) {
        // your code here
    }
    

    Called when entity (e. g. stick) is lit and becomes a campfire.

    Parameters

    Returns void

onBurnOut

  • onBurnOut(targetEntity: YEntity): void
  • onBurnOut(): void
  • //@YEvent
    /** @type {(targetEntity: YEntity) => void} */
    function onBurnOut(targetEntity) {
        // your code here
    }
    

    Called when an entity burns out to a next state.

    Parameters

    Returns void

  • //@YEvent
    /** @type {() => void} */
    function onBurnOut() {
        // your code here
    }
    

    Called when an entity burns out to a next state.

    Returns void

onButtonClicked

  • //@YEvent
    /** @type {(player: YCharacter, button: YUiWidget, parameter: string) => void} */
    function onButtonClicked(player,button,parameter) {
        // your code here
    }
    

    Called after player clicks on a button.

    Parameters

    Returns void

onChangeSpotlightColor

  • onChangeSpotlightColor(triggerEntity: YEntity, targetEntity: YEntity): void
  • onChangeSpotlightColor(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onChangeSpotlightColor(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when color of entity (spotlight) is changed by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onChangeSpotlightColor(triggerEntity) {
        // your code here
    }
    

    Called when color of the entity (spotlight) is changed.

    Parameters

    Returns void

onCharge

  • //@YEvent
    /** @type {(triggerEntity: YEntity, charger: YEntity, amount: number) => void} */
    function onCharge(triggerEntity,charger,amount) {
        // your code here
    }
    

    Called when entity is charged up by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, charger: YEntity, amount: number) => void} */
    function onCharge(triggerEntity,targetEntity,charger,amount) {
        // your code here
    }
    

    Called when entity is charged up by a player.

    Parameters

    Returns void

onClientMessageReceived

  • onClientMessageReceived(player: YCharacter, name: string, args: any[]): void
  • //@YEvent
    /** @type {(player: YCharacter, name: string, args: any[]) => void} */
    function onClientMessageReceived(player,name,args) {
        // your code here
    }
    

    Called when client recives message from server script.

    Parameters

    Returns void

onClimb

  • onClimb(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onClimb(triggerEntity) {
        // your code here
    }
    

    Called whenever player starts climbing a ladder.

    Parameters

    Returns void

onClimbLadder

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onClimbLadder(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a ladder entity is climbed by a player.

    Parameters

    Returns void

onClose

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onClose(triggerEntity) {
        // your code here
    }
    

    Called whenever target doors are closed.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(character: YCharacter) => void} */
    function onClose(character) {
        // your code here
    }
    

    Called when the container is closed by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onClose(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called on player's interaction with an entity: Close.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onClose(player) {
        // your code here
    }
    

    Called when custom window is closed.

    Parameters

    Returns void

onClosed

  • //@YEvent
    /** @type {(questioner: YEntity, player: YCharacter) => void} */
    function onClosed(questioner,player) {
        // your code here
    }
    

    Called when a dialogue window is closed.

    Parameters

    Returns void

onCollect

  • //@YEvent
    /** @type {(triggerEntity: YEntity, products: YEntity[]) => void} */
    function onCollect(triggerEntity,products) {
        // your code here
    }
    

    Called when a player collects resources from an entity s.a. Grass, Bush or Trees.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, products: YEntity[]) => void} */
    function onCollect(triggerEntity,targetEntity,products) {
        // your code here
    }
    

    Called when a player collects resources from an entity s.a. Grass, Bush or Trees.

    Parameters

    Returns void

onColorChange

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, oldColor1: YColor, oldColor2: YColor, oldColor3: YColor) => void} */
    function onColorChange(triggerEntity,targetEntity,oldColor1,oldColor2,oldColor3) {
        // your code here
    }
    

    Called when player paints an entity.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, oldColor1: YColor, oldColor2: YColor, oldColor3: YColor) => void} */
    function onColorChange(triggerEntity,oldColor1,oldColor2,oldColor3) {
        // your code here
    }
    

    Called when player paints an entity.

    Parameters

    Returns void

onColorRevert

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, oldColor1: YColor, oldColor2: YColor, oldColor3: YColor) => void} */
    function onColorRevert(triggerEntity,targetEntity,oldColor1,oldColor2,oldColor3) {
        // your code here
    }
    

    Called when a player reverts color(s) of an entity.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, oldColor1: YColor, oldColor2: YColor, oldColor3: YColor) => void} */
    function onColorRevert(triggerEntity,oldColor1,oldColor2,oldColor3) {
        // your code here
    }
    

    Called when a player reverts color(s) of an entity.

    Parameters

    Returns void

onControl

  • onControl(triggerEntity: YEntity): void
  • onControl(triggerEntity: YEntity): void
  • onControl(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onControl(triggerEntity) {
        // your code here
    }
    

    Called whenever player starts controlling an entity.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onControl(triggerEntity) {
        // your code here
    }
    

    Called whenever player starts controlling a vehicle.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onControl(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when player starts controlling an entity.

    Parameters

    Returns void

onControlStop

  • onControlStop(triggerEntity: YEntity, targetEntity: YEntity): void
  • onControlStop(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onControlStop(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when player stops controlling an entity.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onControlStop(triggerEntity) {
        // your code here
    }
    

    Called when player stops controlling an entity.

    Parameters

    Returns void

onCountChanged

  • onCountChanged(oldCount: number, newCount: number): void
  • //@YEvent
    /** @type {(oldCount: number, newCount: number) => void} */
    function onCountChanged(oldCount,newCount) {
        // your code here
    }
    

    Called whenever label entity count is changed.

    Parameters

    • oldCount: number
    • newCount: number

    Returns void

onCraft

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onCraft(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a player crafts target entity.

    Parameters

    Returns void

onCreate

  • onCreate(): void
  • //@YEvent
    /** @type {() => void} */
    function onCreate() {
        // your code here
    }
    

    Called when the game object is spawned to world.

    Returns void

onCreateCampfire

  • //@YEvent
    /** @type {(triggerEntity: YEntity, campfire: YEntity) => void} */
    function onCreateCampfire(triggerEntity,campfire) {
        // your code here
    }
    

    Called when entity (e. g. stick) is lit and becomes a campfire.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, campfire: YEntity) => void} */
    function onCreateCampfire(triggerEntity,targetEntity,campfire) {
        // your code here
    }
    

    Called when entity (e. g. stick) is lit and becomes a campfire.

    Parameters

    Returns void

onCustomAction

  • onCustomAction(player: YCharacter, actionId: string, deltaTime: number): void
  • //@YEvent
    /** @type {(player: YCharacter, actionId: string, deltaTime: number) => void} */
    function onCustomAction(player,actionId,deltaTime) {
        // your code here
    }
    

    Called when a custom key action is triggered.

    Parameters

    • player: YCharacter
    • actionId: string
    • deltaTime: number

    Returns void

onCustomConsoleCommand

  • onCustomConsoleCommand(triggerEntity: YEntity, command: string, args: string[]): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, command: string, args: string[]) => void} */
    function onCustomConsoleCommand(triggerEntity,command,args) {
        // your code here
    }
    

    Called when a player executes a custom console command.

    Parameters

    • triggerEntity: YEntity
    • command: string
    • args: string[]

    Returns void

onCustomInteraction

  • onCustomInteraction(triggerEntity: YEntity, interactionId: string): void
  • onCustomInteraction(triggerEntity: YEntity, targetEntity: YEntity, interactionId: string): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, interactionId: string) => void} */
    function onCustomInteraction(triggerEntity,interactionId) {
        // your code here
    }
    

    Called when an entity activates a Custom Interaction of an object.

    Parameters

    • triggerEntity: YEntity
    • interactionId: string

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, interactionId: string) => void} */
    function onCustomInteraction(triggerEntity,targetEntity,interactionId) {
        // your code here
    }
    

    Called when a player triggers an entity's custom interaction.

    Parameters

    Returns void

onCustomKeyAction

  • onCustomKeyAction(player: YCharacter, keyActionId: string, deltaTime: number): void
  • //@YEvent
    /** @type {(player: YCharacter, keyActionId: string, deltaTime: number) => void} */
    function onCustomKeyAction(player,keyActionId,deltaTime) {
        // your code here
    }
    

    Called when custom key action is triggered.

    Parameters

    • player: YCharacter
    • keyActionId: string
    • deltaTime: number

    Returns void

onDamage

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, damage: number, type: YDamageType) => void} */
    function onDamage(triggerEntity,targetEntity,damage,type) {
        // your code here
    }
    

    Called whenever the entity recieves damage.

    Parameters

    Returns void

onDeactivateInHotbar

  • onDeactivateInHotbar(triggerEntity: YEntity, targetEntity: YEntity): void
  • onDeactivateInHotbar(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onDeactivateInHotbar(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when entity is deactivated in player's hotbar.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onDeactivateInHotbar(triggerEntity) {
        // your code here
    }
    

    Called when entity is deactivated in player's hotbar.

    Parameters

    Returns void

onDefendEnd

  • onDefendEnd(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onDefendEnd(triggerEntity) {
        // your code here
    }
    

    Called when a player stops defending.

    Parameters

    Returns void

onDefendStart

  • onDefendStart(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onDefendStart(triggerEntity) {
        // your code here
    }
    

    Called when a player begins a defensive stance.

    Parameters

    Returns void

onDefendSuccess

  • //@YEvent
    /** @type {(triggerEntity: YEntity, attacker: YEntity) => void} */
    function onDefendSuccess(triggerEntity,attacker) {
        // your code here
    }
    

    Called when a player successfully defends against an attack.

    Parameters

    Returns void

onDialogAnswered

  • //@YEvent
    /** @type {(dialogue: YUiDialogWindow, answer: number, questioner: YEntity, player: YCharacter) => void} */
    function onDialogAnswered(dialogue,answer,questioner,player) {
        // your code here
    }
    

    Called when a player enters an answer during a Dialogue.

    Parameters

    Returns void

onDig

  • //@YEvent
    /** @type {(triggerEntity: YEntity, position: YVector3) => void} */
    function onDig(triggerEntity,position) {
        // your code here
    }
    

    Called when the entity is destroyed.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, position: YVector3) => void} */
    function onDig(triggerEntity,targetEntity,position) {
        // your code here
    }
    

    Called when entity (tool) is used to dig. Used in Event Listener script.

    Parameters

    Returns void

onDismantle

  • onDismantle(triggerEntity: YEntity): void
  • onDismantle(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onDismantle(triggerEntity) {
        // your code here
    }
    

    Called when entity is being dismantled.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onDismantle(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when entity is being dismantled.

    Parameters

    Returns void

onDismount

  • onDismount(triggerEntity: YEntity): void
  • onDismount(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onDismount(triggerEntity) {
        // your code here
    }
    

    Called when a character dismounts an animal.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onDismount(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a character dismounts an animal.

    Parameters

    Returns void

onDoDamage

  • //@YEvent
    /** @type {(targetEntity: YEntity, damage: number, type: YDamageType) => void} */
    function onDoDamage(targetEntity,damage,type) {
        // your code here
    }
    

    Called whenever the entity deals damage.

    Parameters

    Returns void

onDodge

  • onDodge(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onDodge(triggerEntity) {
        // your code here
    }
    

    Called when character dodges.

    Parameters

    Returns void

onDrink

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onDrink(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when target potion is being drunk by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onDrink(triggerEntity) {
        // your code here
    }
    

    Called when a player drinks a potion.

    Parameters

    Returns void

onDrop

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onDrop(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when entity is dropped from inventory.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onDrop(triggerEntity) {
        // your code here
    }
    

    Called when entity is dropped from inventory.

    Parameters

    Returns void

onDropLoot

  • onDropLoot(droppedItems: YEntity[]): void
  • onDropLoot(targetEntity: YEntity, droppedItems: YEntity[]): void
  • //@YEvent
    /** @type {(droppedItems: YEntity[]) => void} */
    function onDropLoot(droppedItems) {
        // your code here
    }
    

    Called when entity drops loot.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(targetEntity: YEntity, droppedItems: YEntity[]) => void} */
    function onDropLoot(targetEntity,droppedItems) {
        // your code here
    }
    

    Called when entity drops loot.

    Parameters

    Returns void

onEat

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onEat(triggerEntity) {
        // your code here
    }
    

    Called when a player eats.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onEat(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a player eats.

    Parameters

    Returns void

onEmote

  • //@YEvent
    /** @type {(triggerEntity: YEntity, emote: YEmote) => void} */
    function onEmote(triggerEntity,emote) {
        // your code here
    }
    

    Called when a player plays an emote.

    Parameters

    Returns void

onEntityAdded

  • onEntityAdded(entity: YEntity): void
  • //@YEvent
    /** @type {(entity: YEntity) => void} */
    function onEntityAdded(entity) {
        // your code here
    }
    

    Called whenever an entity is added to the label.

    Parameters

    Returns void

onEntityAddedToLabel

  • //@YEvent
    /** @type {(entityLabel: YEntityLabel, entity: YEntity) => void} */
    function onEntityAddedToLabel(entityLabel,entity) {
        // your code here
    }
    

    Called when an entity is added to an Entity label.

    Parameters

    Returns void

onEntityAwake

  • onEntityAwake(targetEntity: YEntity): void
  • //@YEvent
    /** @type {(targetEntity: YEntity) => void} */
    function onEntityAwake(targetEntity) {
        // your code here
    }
    

    Called any time a game object is loaded to world.

    Parameters

    Returns void

onEntityCreate

  • onEntityCreate(targetEntity: YEntity): void
  • //@YEvent
    /** @type {(targetEntity: YEntity) => void} */
    function onEntityCreate(targetEntity) {
        // your code here
    }
    

    Called when game object is spawned to world.

    Parameters

    Returns void

onEntityGameStart

  • onEntityGameStart(targetEntity: YEntity): void
  • //@YEvent
    /** @type {(targetEntity: YEntity) => void} */
    function onEntityGameStart(targetEntity) {
        // your code here
    }
    

    Called when game object is loaded to world for first time.

    Parameters

    Returns void

onEntityLabelCountChanged

  • onEntityLabelCountChanged(entityLabel: YEntityLabel, oldCount: number, newCount: number): void
  • //@YEvent
    /** @type {(entityLabel: YEntityLabel, oldCount: number, newCount: number) => void} */
    function onEntityLabelCountChanged(entityLabel,oldCount,newCount) {
        // your code here
    }
    

    Called when the entity count of the target Entity label changes.

    Parameters

    • entityLabel: YEntityLabel
    • oldCount: number
    • newCount: number

    Returns void

onEntityRemoved

  • onEntityRemoved(entity: YEntity): void
  • //@YEvent
    /** @type {(entity: YEntity) => void} */
    function onEntityRemoved(entity) {
        // your code here
    }
    

    Called whenever an entity is removed from the label.

    Parameters

    Returns void

onEntityRemovedFromLabel

  • //@YEvent
    /** @type {(entityLabel: YEntityLabel, entity: YEntity) => void} */
    function onEntityRemovedFromLabel(entityLabel,entity) {
        // your code here
    }
    

    Called when an entity is removed from an Entity label.

    Parameters

    Returns void

onEntitySpawn

  • //@YEvent
    /** @type {(entity: YEntity) => void} */
    function onEntitySpawn(entity) {
        // your code here
    }
    

    Called when entity is spawned from Entity Template.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(entityTemplate: YEntityTemplate, entity: YEntity) => void} */
    function onEntitySpawn(entityTemplate,entity) {
        // your code here
    }
    

    Called when an entity is spawned from an Entity Template.

    Parameters

    Returns void

onEquip

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onEquip(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when an entity is equipped by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onEquip(triggerEntity) {
        // your code here
    }
    

    Called when an entity is equipped by a player.

    Parameters

    Returns void

onExplode

  • onExplode(targetEntity: YEntity, hittedEntities: YEntity[]): void
  • onExplode(hittedEntities: YEntity[]): void
  • //@YEvent
    /** @type {(targetEntity: YEntity, hittedEntities: YEntity[]) => void} */
    function onExplode(targetEntity,hittedEntities) {
        // your code here
    }
    

    Called in the moment when an entity explodes.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(hittedEntities: YEntity[]) => void} */
    function onExplode(hittedEntities) {
        // your code here
    }
    

    Called in the moment when an entity explodes.

    Parameters

    Returns void

onExtinguish

  • onExtinguish(triggerEntity: YEntity): void
  • onExtinguish(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onExtinguish(triggerEntity) {
        // your code here
    }
    

    Called whenever a antity is extinquished.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onExtinguish(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a player extinguishes a lit entity, such as a torch or a candle.

    Parameters

    Returns void

onFeedAnimal

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, foodEntity: YEntity) => void} */
    function onFeedAnimal(triggerEntity,targetEntity,foodEntity) {
        // your code here
    }
    

    Called when an animal (tool) is fed by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, foodEntity: YEntity) => void} */
    function onFeedAnimal(triggerEntity,foodEntity) {
        // your code here
    }
    

    Called when an animal (tool) is fed by a player.

    Parameters

    Returns void

onFeedFire

  • //@YEvent
    /** @type {(triggerEntity: YEntity, fuel: YEntity) => void} */
    function onFeedFire(triggerEntity,fuel) {
        // your code here
    }
    

    Called when fuel is put into a fire.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, fuel: YEntity) => void} */
    function onFeedFire(triggerEntity,targetEntity,fuel) {
        // your code here
    }
    

    Called when fuel is put into a fire by a player.

    Parameters

    Returns void

onFish

  • //@YEvent
    /** @type {(triggerEntity: YEntity, fish: YEntity) => void} */
    function onFish(triggerEntity,fish) {
        // your code here
    }
    

    Called when a player uses a fishing rod to "fish".

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, fish: YEntity) => void} */
    function onFish(triggerEntity,targetEntity,fish) {
        // your code here
    }
    

    Called when a player uses a fishing rod to "fish".

    Parameters

    Returns void

onFixedUpdate

  • onFixedUpdate(deltaTime: number): void
  • //@YEvent
    /** @type {(deltaTime: number) => void} */
    function onFixedUpdate(deltaTime) {
        // your code here
    }
    

    Called for each fixed update within the scene.

    Parameters

    • deltaTime: number

    Returns void

onFlightEnd

  • onFlightEnd(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onFlightEnd(triggerEntity) {
        // your code here
    }
    

    Called when a player ends flight.

    Parameters

    Returns void

onFlightStart

  • onFlightStart(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onFlightStart(triggerEntity) {
        // your code here
    }
    

    Called when a player begins flight.

    Parameters

    Returns void

onFreeTrappedEntity

  • //@YEvent
    /** @type {(triggerEntity: YEntity, trappedEntity: YEntity) => void} */
    function onFreeTrappedEntity(triggerEntity,trappedEntity) {
        // your code here
    }
    

    Called when entity is freed from a trap by the player*. Used in entity script of the trap.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, trappedEntity: YEntity) => void} */
    function onFreeTrappedEntity(triggerEntity,targetEntity,trappedEntity) {
        // your code here
    }
    

    Called when entity is freed from a trap by the player*.

    Parameters

    Returns void

onFuel

  • //@YEvent
    /** @type {(triggerEntity: YEntity, Fuel: YEntity, amount: number) => void} */
    function onFuel(triggerEntity,Fuel,amount) {
        // your code here
    }
    

    Called when an engine (steam) is fueled by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, fuel: YEntity, amount: number) => void} */
    function onFuel(triggerEntity,targetEntity,fuel,amount) {
        // your code here
    }
    

    Called when an engine (steam) is fueled by a player.

    Parameters

    Returns void

onGameLogicSpawn

  • //@YEvent
    /** @type {(gameLogic: YLogic) => void} */
    function onGameLogicSpawn(gameLogic) {
        // your code here
    }
    

    Called when the game logic is spawned to the world from template.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(logicTemplate: YLogicTemplate, gameLogic: YLogic) => void} */
    function onGameLogicSpawn(logicTemplate,gameLogic) {
        // your code here
    }
    

    Called when a Game Logic is spawned from a Game Logic Template.

    Parameters

    Returns void

onGameStart

  • onGameStart(): void
  • //@YEvent
    /** @type {() => void} */
    function onGameStart() {
        // your code here
    }
    

    Called when the game object is loaded to world for first time*.

    Returns void

onGetDamage

  • //@YEvent
    /** @type {(triggerEntity: YEntity, damage: number, type: YDamageType) => void} */
    function onGetDamage(triggerEntity,damage,type) {
        // your code here
    }
    

    Called on an entity getting damaged.

    Parameters

    Returns void

onGrow

  • onGrow(targetEntity: YEntity): void
  • onGrow(): void
  • //@YEvent
    /** @type {(targetEntity: YEntity) => void} */
    function onGrow(targetEntity) {
        // your code here
    }
    

    Called when a plant grows (thus changes it's model).

    Parameters

    Returns void

  • //@YEvent
    /** @type {() => void} */
    function onGrow() {
        // your code here
    }
    

    Called when a plant grows (thus changes it's model).

    Returns void

onHeavyAttackChargeStart

  • onHeavyAttackChargeStart(triggerEntity: YEntity, weapon: YEntity): void
  • onHeavyAttackChargeStart(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, weapon: YEntity) => void} */
    function onHeavyAttackChargeStart(triggerEntity,weapon) {
        // your code here
    }
    

    Called when a player starts charging a melee weapons for a heavy attack.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onHeavyAttackChargeStart(triggerEntity) {
        // your code here
    }
    

    Called when a player starts charging a melee weapons for a heavy attack.

    Parameters

    Returns void

onIgnite

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onIgnite(triggerEntity) {
        // your code here
    }
    

    Called whenever an explosive entity becomes ignited (explosion timer initiated).

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onIgnite(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when an explosive entity becomes ignited (explosion timer initiated).

    Parameters

    Returns void

onInputEditEnded

  • //@YEvent
    /** @type {(player: YCharacter, input: YUiWidget, text: string) => void} */
    function onInputEditEnded(player,input,text) {
        // your code here
    }
    

    Called when the text in the input widget is changed.

    Parameters

    Returns void

onInteractWithWorkstation

  • onInteractWithWorkstation(triggerEntity: YEntity): void
  • onInteractWithWorkstation(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onInteractWithWorkstation(triggerEntity) {
        // your code here
    }
    

    Called whenever player interacts with a workstation.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onInteractWithWorkstation(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a player interacts with a workstation.

    Parameters

    Returns void

onItemAddedToInventory

  • onItemAddedToInventory(triggerEntity: YEntity): void
  • onItemAddedToInventory(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onItemAddedToInventory(triggerEntity) {
        // your code here
    }
    

    Called when an item is added to the entity's inventory.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onItemAddedToInventory(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when an item is added to a player's inventory.

    Parameters

    Returns void

onItemPlacingEnded

  • onItemPlacingEnded(triggerEntity: YEntity): void
  • onItemPlacingEnded(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onItemPlacingEnded(triggerEntity) {
        // your code here
    }
    

    Called when an item is placed from the inventory.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onItemPlacingEnded(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when an item is placed from the inventory.

    Parameters

    Returns void

onItemPlacingStarted

  • onItemPlacingStarted(triggerEntity: YEntity): void
  • onItemPlacingStarted(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onItemPlacingStarted(triggerEntity) {
        // your code here
    }
    

    Called when an item starts to be placed from the inventory.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onItemPlacingStarted(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when an item starts to be placed from the inventory.

    Parameters

    Returns void

onItemRemovedFromInventory

  • onItemRemovedFromInventory(triggerEntity: YEntity): void
  • onItemRemovedFromInventory(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onItemRemovedFromInventory(triggerEntity) {
        // your code here
    }
    

    Called when an item is removed from the entity's inventory.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onItemRemovedFromInventory(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when an item is removed from a player's inventory.

    Parameters

    Returns void

onJump

  • onJump(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onJump(triggerEntity) {
        // your code here
    }
    

    Called when a player jumps.

    Parameters

    Returns void

onKill

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, damage: number, type: YDamageType) => void} */
    function onKill(triggerEntity,targetEntity,damage,type) {
        // your code here
    }
    

    Called when the entity is destroyed.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, damage: number, type: YDamageType) => void} */
    function onKill(triggerEntity,damage,type) {
        // your code here
    }
    

    Called when the entity is destroyed.

    Parameters

    Returns void

onLieDown

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onLieDown(triggerEntity) {
        // your code here
    }
    

    Called whenever a character lies down in a bed.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onLieDown(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a character lies down in a bed.

    Parameters

    Returns void

onLight

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onLight(triggerEntity) {
        // your code here
    }
    

    Called whenever an entity is lit.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onLight(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a player lights up an entity, such as a fireplace, torch or a candle.

    Parameters

    Returns void

onLink

  • onLink(triggerEntity: YEntity, targetEntity1: YEntity, targetEntity2: YEntity, port1: number, port2: number): void
  • onLink(triggerEntity: YEntity, targetEntity2: YEntity, port1: number, port2: number): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity1: YEntity, targetEntity2: YEntity, port1: number, port2: number) => void} */
    function onLink(triggerEntity,targetEntity1,targetEntity2,port1,port2) {
        // your code here
    }
    

    Called when an energy entity is linked to the energy network.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity2: YEntity, port1: number, port2: number) => void} */
    function onLink(triggerEntity,targetEntity2,port1,port2) {
        // your code here
    }
    

    Called when an energy entity is linked to the energy network.

    Parameters

    • triggerEntity: YEntity
    • targetEntity2: YEntity
    • port1: number
    • port2: number

    Returns void

onLock

  • //@YEvent
    /** @type {(triggerEntity: YEntity, key: YEntity) => void} */
    function onLock(triggerEntity,key) {
        // your code here
    }
    

    Called whenever an entity is locked.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, key: YEntity) => void} */
    function onLock(triggerEntity,targetEntity,key) {
        // your code here
    }
    

    Called when a player locks an entity with a key.

    Parameters

    Returns void

onLockPadlock

  • //@YEvent
    /** @type {(triggerEntity: YEntity, padlock: YEntity, key: YEntity) => void} */
    function onLockPadlock(triggerEntity,padlock,key) {
        // your code here
    }
    

    Called when a player locks a padlock with a key.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, padlock: YEntity, key: YEntity) => void} */
    function onLockPadlock(triggerEntity,targetEntity,padlock,key) {
        // your code here
    }
    

    Called when a player locks a padlock with a key.

    Parameters

    Returns void

onLogicAdded

  • onLogicAdded(logic: YLogic): void
  • //@YEvent
    /** @type {(logic: YLogic) => void} */
    function onLogicAdded(logic) {
        // your code here
    }
    

    Called when a game logic is attached to a Game Logic Label.

    Parameters

    Returns void

onLogicAddedToLabel

  • //@YEvent
    /** @type {(logicLabel: YLogicLabel, logic: YLogic) => void} */
    function onLogicAddedToLabel(logicLabel,logic) {
        // your code here
    }
    

    Called when a Game Logic is added to a Game Logic label

    Parameters

    Returns void

onLogicAwake

  • onLogicAwake(targetLogic: YLogic): void
  • //@YEvent
    /** @type {(targetLogic: YLogic) => void} */
    function onLogicAwake(targetLogic) {
        // your code here
    }
    

    Called any time a game game logic is loaded to world.

    Parameters

    Returns void

onLogicCreate

  • onLogicCreate(targetLogic: YLogic): void
  • //@YEvent
    /** @type {(targetLogic: YLogic) => void} */
    function onLogicCreate(targetLogic) {
        // your code here
    }
    

    Called when game game logic is spawned to world.

    Parameters

    Returns void

onLogicGameStart

  • onLogicGameStart(targetLogic: YLogic): void
  • //@YEvent
    /** @type {(targetLogic: YLogic) => void} */
    function onLogicGameStart(targetLogic) {
        // your code here
    }
    

    Called when game game logic is loaded to world for first time.

    Parameters

    Returns void

onLogicLabelCountChanged

  • onLogicLabelCountChanged(logicLabel: YLogicLabel, oldCount: number, newCount: number): void
  • //@YEvent
    /** @type {(logicLabel: YLogicLabel, oldCount: number, newCount: number) => void} */
    function onLogicLabelCountChanged(logicLabel,oldCount,newCount) {
        // your code here
    }
    

    Called when the Game Logic count of the target Game Logic label changes.

    Parameters

    • logicLabel: YLogicLabel
    • oldCount: number
    • newCount: number

    Returns void

onLogicRemoved

  • onLogicRemoved(logic: YLogic): void
  • //@YEvent
    /** @type {(logic: YLogic) => void} */
    function onLogicRemoved(logic) {
        // your code here
    }
    

    Called when a game logic is removed from a Game Logic Label.

    Parameters

    Returns void

onLogicRemovedFromLabel

  • //@YEvent
    /** @type {(logicLabel: YLogicLabel, logic: YLogic) => void} */
    function onLogicRemovedFromLabel(logicLabel,logic) {
        // your code here
    }
    

    Called when a Game Logic is removed from a Game Logic label.

    Parameters

    Returns void

onMount

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onMount(triggerEntity) {
        // your code here
    }
    

    Called whenever a character mounts an animal.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onMount(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a player mounts an animal.

    Parameters

    Returns void

onMovementInstructionEnd

  • onMovementInstructionEnd(): void
  • onMovementInstructionEnd(targetLogic: YLogic): void
  • onMovementInstructionEnd(): void
  • onMovementInstructionEnd(targetEntity: YEntity): void
  • //@YEvent
    /** @type {() => void} */
    function onMovementInstructionEnd() {
        // your code here
    }
    

    Called at the end of a movement instruction.

    Returns void

  • //@YEvent
    /** @type {(targetLogic: YLogic) => void} */
    function onMovementInstructionEnd(targetLogic) {
        // your code here
    }
    

    Called at the end of a movement instruction.

    Parameters

    Returns void

  • //@YEvent
    /** @type {() => void} */
    function onMovementInstructionEnd() {
        // your code here
    }
    

    Called at the end of a movement instruction.

    Returns void

  • //@YEvent
    /** @type {(targetEntity: YEntity) => void} */
    function onMovementInstructionEnd(targetEntity) {
        // your code here
    }
    

    Called at the end of a movement instruction.

    Parameters

    Returns void

onOpen

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onOpen(triggerEntity) {
        // your code here
    }
    

    Called whenever target doors are opened.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onOpen(triggerEntity) {
        // your code here
    }
    

    Called whenever a container is opened.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onOpen(triggerEntity) {
        // your code here
    }
    

    Called whenever player opens a map.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(questioner: YEntity, player: YCharacter) => void} */
    function onOpen(questioner,player) {
        // your code here
    }
    

    Called when a dialogue window is opened.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onOpen(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called on player's interaction with an entity: Open.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onOpen(player) {
        // your code here
    }
    

    Called when custom window is opened.

    Parameters

    Returns void

onOpenFail

  • onOpenFail(triggerEntity: YEntity, targetEntity: YEntity): void
  • onOpenFail(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onOpenFail(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a player tries to open a locked entity and fails.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onOpenFail(triggerEntity) {
        // your code here
    }
    

    Called when a player tries to open a locked entity and fails.

    Parameters

    Returns void

onOpenMap

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onOpenMap(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a player opens a map.

    Parameters

    Returns void

onOverheatEnded

  • onOverheatEnded(targetEntity: YEntity): void
  • onOverheatEnded(): void
  • //@YEvent
    /** @type {(targetEntity: YEntity) => void} */
    function onOverheatEnded(targetEntity) {
        // your code here
    }
    

    Called when an entity returns from the overheat status.

    Parameters

    Returns void

  • //@YEvent
    /** @type {() => void} */
    function onOverheatEnded() {
        // your code here
    }
    

    Called when an entity returns from the overheat status.

    Returns void

onOverheatStarted

  • onOverheatStarted(): void
  • onOverheatStarted(targetEntity: YEntity): void
  • //@YEvent
    /** @type {() => void} */
    function onOverheatStarted() {
        // your code here
    }
    

    Called when an entity enters the overheat status.

    Returns void

  • //@YEvent
    /** @type {(targetEntity: YEntity) => void} */
    function onOverheatStarted(targetEntity) {
        // your code here
    }
    

    Called when an entity enters the overheat status.

    Parameters

    Returns void

onPack

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onPack(triggerEntity) {
        // your code here
    }
    

    Called whenever an enity us packed.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onPack(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a player packs up an entity.

    Parameters

    Returns void

onPet

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onPet(triggerEntity) {
        // your code here
    }
    

    Called when player pets an animal.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onPet(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when player pets an animal.

    Parameters

    Returns void

onPetClaimed

  • onPetClaimed(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onPetClaimed(triggerEntity) {
        // your code here
    }
    

    Called when a pet is claimed.

    Parameters

    Returns void

onPetReleased

  • onPetReleased(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onPetReleased(triggerEntity) {
        // your code here
    }
    

    Called when a pet is released from inventory.

    Parameters

    Returns void

onPickEnd

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onPickEnd(triggerEntity) {
        // your code here
    }
    

    Called when an entity is being picked. Pick End is triggered when the entity appears in player's inventory.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onPickEnd(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called at the end of the process of picking an entity up by a player.

    Parameters

    Returns void

onPickStart

  • onPickStart(triggerEntity: YEntity): void
  • onPickStart(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onPickStart(triggerEntity) {
        // your code here
    }
    

    Called when a player picks up the target entity.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onPickStart(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a player picks up the target entity.

    Parameters

    Returns void

onPlace

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onPlace(triggerEntity) {
        // your code here
    }
    

    Called when an item is placed from the inventory.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onPlace(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when an item is placed from the inventory.

    Parameters

    Returns void

onPlant

  • //@YEvent
    /** @type {(triggerEntity: YEntity, plant: YEntity) => void} */
    function onPlant(triggerEntity,plant) {
        // your code here
    }
    

    Called when a seed is planted.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, plant: YEntity) => void} */
    function onPlant(triggerEntity,targetEntity,plant) {
        // your code here
    }
    

    Called when a seed is planted by a character.

    Parameters

    Returns void

onPlayerConnected

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onPlayerConnected(player) {
        // your code here
    }
    

    Called when player connects to the server.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(gameLogic: YLogic, player: YCharacter) => void} */
    function onPlayerConnected(gameLogic,player) {
        // your code here
    }
    

    Called when a player connects to the session.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onPlayerConnected(player) {
        // your code here
    }
    

    Called when a player connects to the session.

    Parameters

    Returns void

onPlayerCreated

  • //@YEvent
    /** @type {(character: YCharacter) => void} */
    function onPlayerCreated(character) {
        // your code here
    }
    

    Called when player is spawned to the world.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(spawnPoint: YLogic, character: YCharacter) => void} */
    function onPlayerCreated(spawnPoint,character) {
        // your code here
    }
    

    Called when a player is created.

    Parameters

    Returns void

onPlayerDeath

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onPlayerDeath(player) {
        // your code here
    }
    

    Called on player death.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(gameLogic: YLogic, player: YCharacter) => void} */
    function onPlayerDeath(gameLogic,player) {
        // your code here
    }
    

    Called on player death.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onPlayerDeath(player) {
        // your code here
    }
    

    Called on player death.

    Parameters

    Returns void

onPlayerDisconnected

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onPlayerDisconnected(player) {
        // your code here
    }
    

    Called when player disconnects from the server.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(gameLogic: YLogic, player: YCharacter) => void} */
    function onPlayerDisconnected(gameLogic,player) {
        // your code here
    }
    

    Called when a player disconnects from the session.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onPlayerDisconnected(player) {
        // your code here
    }
    

    Called when a player disconnects from the session.

    Parameters

    Returns void

onPlayerRespawn

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onPlayerRespawn(player) {
        // your code here
    }
    

    Called when player is respawned.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(character: YCharacter) => void} */
    function onPlayerRespawn(character) {
        // your code here
    }
    

    Called when player is respawned to the world.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(gameLogic: YLogic, player: YCharacter) => void} */
    function onPlayerRespawn(gameLogic,player) {
        // your code here
    }
    

    Called on player respawn.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(player: YCharacter, spawnPoint: void) => void} */
    function onPlayerRespawn(player,spawnPoint) {
        // your code here
    }
    

    Called on player respawn.

    Parameters

    Returns void

onPlayerSpawn

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onPlayerSpawn(player) {
        // your code here
    }
    

    Called when player is spawned to the world.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(character: YCharacter) => void} */
    function onPlayerSpawn(character) {
        // your code here
    }
    

    Called on player spawn.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(gameLogic: YLogic, player: YCharacter) => void} */
    function onPlayerSpawn(gameLogic,player) {
        // your code here
    }
    

    Called on player spawn.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(player: YCharacter, spawnPoint: YLogic) => void} */
    function onPlayerSpawn(player,spawnPoint) {
        // your code here
    }
    

    Called on player spawn.

    Parameters

    Returns void

onPowerDown

  • onPowerDown(): void
  • onPowerDown(targetEntity: YEntity): void
  • //@YEvent
    /** @type {() => void} */
    function onPowerDown() {
        // your code here
    }
    

    Called when entity (e.g. Charging Station) is powered down.

    Returns void

  • //@YEvent
    /** @type {(targetEntity: YEntity) => void} */
    function onPowerDown(targetEntity) {
        // your code here
    }
    

    Called when entity (e.g. Charging Station) is powered down.

    Parameters

    Returns void

onPowerUp

  • onPowerUp(): void
  • onPowerUp(targetEntity: YEntity): void
  • //@YEvent
    /** @type {() => void} */
    function onPowerUp() {
        // your code here
    }
    

    Called when entity (e.g. Charging Station) is powered up.

    Returns void

  • //@YEvent
    /** @type {(targetEntity: YEntity) => void} */
    function onPowerUp(targetEntity) {
        // your code here
    }
    

    Called when entity (e.g. Charging Station) is powered up.

    Parameters

    Returns void

onRead

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onRead(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when an entity is being read by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onRead(triggerEntity) {
        // your code here
    }
    

    Called when an entity is being read by the player.

    Parameters

    Returns void

onReadingEnded

  • onReadingEnded(triggerEntity: YEntity, targetEntity: YEntity): void
  • onReadingEnded(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onReadingEnded(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called after character stop reading.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onReadingEnded(triggerEntity) {
        // your code here
    }
    

    Called after character stop reading.

    Parameters

    Returns void

onRechargeEverythingInRange

  • onRechargeEverythingInRange(triggerEntity: YEntity, chargedEntities: YEntity[]): void
  • onRechargeEverythingInRange(triggerEntity: YEntity, targetEntity: YEntity, chargedEntities: YEntity[]): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, chargedEntities: YEntity[]) => void} */
    function onRechargeEverythingInRange(triggerEntity,chargedEntities) {
        // your code here
    }
    

    Called whenever recharge everything is initated.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, chargedEntities: YEntity[]) => void} */
    function onRechargeEverythingInRange(triggerEntity,targetEntity,chargedEntities) {
        // your code here
    }
    

    Called when a player recharges all energy entities in range.

    Parameters

    Returns void

onRefillAirtank

  • onRefillAirtank(triggerEntity: YEntity, targetEntity: YEntity): void
  • onRefillAirtank(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onRefillAirtank(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when an airtank is refilled by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onRefillAirtank(triggerEntity) {
        // your code here
    }
    

    Called when an airtank is refilled by a player.

    Parameters

    Returns void

onRefillOxygen

  • onRefillOxygen(triggerEntity: YEntity, targetEntity: YEntity): void
  • onRefillOxygen(triggerEntity: void): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onRefillOxygen(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when player refills oxygen

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: void) => void} */
    function onRefillOxygen(triggerEntity) {
        // your code here
    }
    

    Called when an entity refills its oxygen

    Parameters

    • triggerEntity: void

    Returns void

onReload

  • onReload(triggerEntity: YEntity, loadedAmmo: number): void
  • onReload(triggerEntity: YEntity, targetEntity: YEntity, loadedAmmo: number): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, loadedAmmo: number) => void} */
    function onReload(triggerEntity,loadedAmmo) {
        // your code here
    }
    

    Called when an item is being reloaded.

    Parameters

    • triggerEntity: YEntity
    • loadedAmmo: number

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, loadedAmmo: number) => void} */
    function onReload(triggerEntity,targetEntity,loadedAmmo) {
        // your code here
    }
    

    Called when an item is being reloaded.

    Parameters

    Returns void

onRepairBoat

  • onRepairBoat(triggerEntity: YEntity, targetEntity: YEntity): void
  • onRepairBoat(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onRepairBoat(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when player repairs a boat.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onRepairBoat(triggerEntity) {
        // your code here
    }
    

    Called when a boat is repaired.

    Parameters

    Returns void

onRotationInstructionEnd

  • onRotationInstructionEnd(): void
  • onRotationInstructionEnd(targetLogic: YLogic): void
  • onRotationInstructionEnd(): void
  • onRotationInstructionEnd(targetEntity: YEntity): void
  • //@YEvent
    /** @type {() => void} */
    function onRotationInstructionEnd() {
        // your code here
    }
    

    Called at the end of a rotation instruction.

    Returns void

  • //@YEvent
    /** @type {(targetLogic: YLogic) => void} */
    function onRotationInstructionEnd(targetLogic) {
        // your code here
    }
    

    Called at the end of a rotation instruction.

    Parameters

    Returns void

  • //@YEvent
    /** @type {() => void} */
    function onRotationInstructionEnd() {
        // your code here
    }
    

    Called at the end of a rotation instruction.

    Returns void

  • //@YEvent
    /** @type {(targetEntity: YEntity) => void} */
    function onRotationInstructionEnd(targetEntity) {
        // your code here
    }
    

    Called at the end of a rotation instruction.

    Parameters

    Returns void

onSaw

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onSaw(triggerEntity) {
        // your code here
    }
    

    Called when a tree is being sawed down.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onSaw(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a tree is being sawed down by a player.

    Parameters

    Returns void

onScriptPlay

  • onScriptPlay(): void
  • //@YEvent
    /** @type {() => void} */
    function onScriptPlay() {
        // your code here
    }
    

    Called when Live Script play button is clicked.

    Returns void

onScriptStop

  • onScriptStop(): void
  • //@YEvent
    /** @type {() => void} */
    function onScriptStop() {
        // your code here
    }
    

    Called when Live Script stop button is clicked.

    Returns void

onSit

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onSit(triggerEntity) {
        // your code here
    }
    

    Called whenever a character sits down in a chair or a seat.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onSit(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a character sits down in a chair or a seat.

    Parameters

    Returns void

onSkillInterrupted

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onSkillInterrupted(player) {
        // your code here
    }
    

    Called when the currently casted skill of the player is interrupted.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(skill: YSkill, player: YCharacter) => void} */
    function onSkillInterrupted(skill,player) {
        // your code here
    }
    

    Called when the currently casted skill of the player is interrupted.

    Parameters

    Returns void

onSleep

  • onSleep(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onSleep(triggerEntity) {
        // your code here
    }
    

    Called when a player goes to sleep in a bed*.

    Parameters

    Returns void

onStandUp

  • onStandUp(triggerEntity: YEntity): void
  • onStandUp(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onStandUp(triggerEntity) {
        // your code here
    }
    

    Called when a character stands up from a chair* or a seat.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onStandUp(triggerEntity) {
        // your code here
    }
    

    Called when a character stands up from a bed.

    Parameters

    Returns void

onStandUpFromBed

  • onStandUpFromBed(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onStandUpFromBed(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a character stands up from a bed.

    Parameters

    Returns void

onStandUpFromChair

  • onStandUpFromChair(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onStandUpFromChair(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a character stands up from a chair or a seat.

    Parameters

    Returns void

onSwinEnd

  • onSwinEnd(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onSwinEnd(triggerEntity) {
        // your code here
    }
    

    Called when character stops swimming.

    Parameters

    Returns void

onSwinStart

  • onSwinStart(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onSwinStart(triggerEntity) {
        // your code here
    }
    

    Called when character starts swimming.

    Parameters

    Returns void

onSwitchOff

  • onSwitchOff(triggerEntity: YEntity): void
  • onSwitchOff(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onSwitchOff(triggerEntity) {
        // your code here
    }
    

    Called whenever a switch is turned off,

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onSwitchOff(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called whenever a switch is turned off by a player.

    Parameters

    Returns void

onSwitchOn

  • onSwitchOn(triggerEntity: YEntity): void
  • onSwitchOn(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onSwitchOn(triggerEntity) {
        // your code here
    }
    

    Called whenever a switch is turned on,

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onSwitchOn(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called whenever a switch is turned on by a player.

    Parameters

    Returns void

onTimeTrigger

  • //@YEvent
    /** @type {(timeTrigger: YTimeTrigger) => void} */
    function onTimeTrigger(timeTrigger) {
        // your code here
    }
    

    Called whenever the set time trigger interval fires.

    Parameters

    Returns void

onTrade

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onTrade(triggerEntity) {
        // your code here
    }
    

    Called whenever trade is initated by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onTrade(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called whenever a player inititates a trade.

    Parameters

    Returns void

onTransactionAccepted

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onTransactionAccepted(player) {
        // your code here
    }
    

    Called in the case that player accepts the transaction.

    Parameters

    Returns void

onTransactionDeclined

  • //@YEvent
    /** @type {(player: YCharacter) => void} */
    function onTransactionDeclined(player) {
        // your code here
    }
    

    Called in the case that player declines the transaction.

    Parameters

    Returns void

onTreatWounds

  • onTreatWounds(triggerEntity: YEntity, amount: number): void
  • onTreatWounds(triggerEntity: YEntity, targetEntity: YEntity, amount: number): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, amount: number) => void} */
    function onTreatWounds(triggerEntity,amount) {
        // your code here
    }
    

    Called when a player uses a bandage to treat wounds.

    Parameters

    • triggerEntity: YEntity
    • amount: number

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, amount: number) => void} */
    function onTreatWounds(triggerEntity,targetEntity,amount) {
        // your code here
    }
    

    Called when a player uses a bandage to treat wounds.

    Parameters

    Returns void

onTrigger

  • onTrigger(): void
  • onTrigger(triggerEntity: YEntity, targetEntity: YEntity): void
  • //@YEvent
    /** @type {() => void} */
    function onTrigger() {
        // your code here
    }
    

    Called whenever a Time Trigger completes a cycle.

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onTrigger(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called whenever Event Listener is triggered.

    Parameters

    Returns void

onTriggerEnter

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onTriggerEnter(triggerEntity) {
        // your code here
    }
    

    Called whenever an entity enter the Trigger Zone.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerLogic: YTriggerZone, triggerEntity: YEntity) => void} */
    function onTriggerEnter(triggerLogic,triggerEntity) {
        // your code here
    }
    

    Called whenever an entity enters the Trigger Zone.

    Parameters

    Returns void

onTriggerExit

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onTriggerExit(triggerEntity) {
        // your code here
    }
    

    Called whenever an entity exit the Trigger Zone.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerLogic: YTriggerZone, triggerEntity: YEntity) => void} */
    function onTriggerExit(triggerLogic,triggerEntity) {
        // your code here
    }
    

    Called whenever an entity leaves the Trigger Zone.

    Parameters

    Returns void

onUnequip

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onUnequip(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when an entity is unequipped by a player.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onUnequip(triggerEntity) {
        // your code here
    }
    

    Called when an entity is unequipped by a player.

    Parameters

    Returns void

onUnlink

  • onUnlink(triggerEntity: YEntity, targetEntity1: YEntity, targetEntity2: YEntity, port1: number, port2: number): void
  • onUnlink(triggerEntity: YEntity, targetEntity2: YEntity, port1: number, port2: number): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity1: YEntity, targetEntity2: YEntity, port1: number, port2: number) => void} */
    function onUnlink(triggerEntity,targetEntity1,targetEntity2,port1,port2) {
        // your code here
    }
    

    Called when an energy entity is unlinked from the energy network.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity2: YEntity, port1: number, port2: number) => void} */
    function onUnlink(triggerEntity,targetEntity2,port1,port2) {
        // your code here
    }
    

    Called when an energy entity is unlinked from the energy network.

    Parameters

    • triggerEntity: YEntity
    • targetEntity2: YEntity
    • port1: number
    • port2: number

    Returns void

onUnlock

  • //@YEvent
    /** @type {(triggerEntity: YEntity, key: YEntity) => void} */
    function onUnlock(triggerEntity,key) {
        // your code here
    }
    

    Called whenever an entity is unlocked.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, key: YEntity) => void} */
    function onUnlock(triggerEntity,targetEntity,key) {
        // your code here
    }
    

    Called when a player unlocks an entity with a key.

    Parameters

    Returns void

onUnlockPadlock

  • //@YEvent
    /** @type {(triggerEntity: YEntity, padlock: YEntity, key: YEntity) => void} */
    function onUnlockPadlock(triggerEntity,padlock,key) {
        // your code here
    }
    

    Called when a player unlocks a padlock with a key.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity, padlock: YEntity, key: YEntity) => void} */
    function onUnlockPadlock(triggerEntity,targetEntity,padlock,key) {
        // your code here
    }
    

    Called when a player unlocks a padlock with a key.

    Parameters

    Returns void

onUnpack

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onUnpack(triggerEntity) {
        // your code here
    }
    

    Called whenever an enity us unpacked.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onUnpack(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when a player unpacks an entity.

    Parameters

    Returns void

onUpdate

  • onUpdate(deltaTime: number): void
  • //@YEvent
    /** @type {(deltaTime: number) => void} */
    function onUpdate(deltaTime) {
        // your code here
    }
    

    Called each time a frame updates.

    Parameters

    • deltaTime: number

    Returns void

onWakeUp

  • onWakeUp(triggerEntity: YEntity): void
  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onWakeUp(triggerEntity) {
        // your code here
    }
    

    Called when a player wakes up in a bed*.

    Parameters

    Returns void

onWasKilled

  • //@YEvent
    /** @type {(triggerEntity: YEntity, damage: number, type: YDamageType) => void} */
    function onWasKilled(triggerEntity,damage,type) {
        // your code here
    }
    

    Called on entity being destroyed.

    Parameters

    Returns void

onWindowClosed

  • //@YEvent
    /** @type {(gameLogic: YLogic, questioner: YEntity, player: YCharacter) => void} */
    function onWindowClosed(gameLogic,questioner,player) {
        // your code here
    }
    

    Called when custom window is closed.

    Parameters

    Returns void

onWindowOpen

  • //@YEvent
    /** @type {(gameLogic: YLogic, questioner: YEntity, player: YCharacter) => void} */
    function onWindowOpen(gameLogic,questioner,player) {
        // your code here
    }
    

    Called when custom window is opened.

    Parameters

    Returns void

onWrite

  • //@YEvent
    /** @type {(triggerEntity: YEntity) => void} */
    function onWrite(triggerEntity) {
        // your code here
    }
    

    Called whenever player writes on an entity.

    Parameters

    Returns void

  • //@YEvent
    /** @type {(triggerEntity: YEntity, targetEntity: YEntity) => void} */
    function onWrite(triggerEntity,targetEntity) {
        // your code here
    }
    

    Called when player writes on a sign.

    Parameters

    Returns void

Generated using TypeDoc