Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Accessors

activeItem

  • Returns item currently held in players hand

    Returns YEntity

canFly

  • get canFly(): boolean
  • Returns boolean

canRespawn

  • get canRespawn(): boolean
  • set canRespawn(value: boolean): any
  • Allows to get / set whenever player can respawn after death.

    Returns boolean

  • Allows to get / set whenever player can respawn after death.

    Parameters

    • value: boolean

    Returns any

canTrade

  • get canTrade(): boolean
  • set canTrade(value: boolean): any
  • Allows to get / set whenever it is possible to trade with selected character (player or NPC).

    Returns boolean

  • Allows to get / set whenever it is possible to trade with selected character (player or NPC).

    Parameters

    • value: boolean

    Returns any

controlledEntity

  • get controlledEntity(): YEntity
  • set controlledEntity(value: YEntity): any
  • Allows to get / set entity which is currently controlled by the character, i.e vehicle, ship, horse .

    Returns YEntity

  • Allows to get / set entity which is currently controlled by the character, i.e vehicle, ship, horse .

    Parameters

    Returns any

description

  • get description(): string
  • set description(value: string): any
  • Allows to get / set the description of the target entity.

    Returns string

  • Allows to get / set the description of the target entity.

    Parameters

    • value: string

    Returns any

equipment

  • Returns an array of currently equipped items of a character. Equipment are items placed in Head, Body, Legs, Feet, Back and Accessory slots.

    Returns YEntity[]

forcedCanFly

  • Allows to get / set whenever a character has the flying ability. Force true / false will override current flight state. Default will return the state before this instruction was used. So if player had flight granted by a potion, he will retain it.

    Returns YForcedBool

  • Allows to get / set whenever a character has the flying ability. Force true / false will override current flight state. Default will return the state before this instruction was used. So if player had flight granted by a potion, he will retain it.

    Parameters

    Returns any

forcedDefaultHitPointRegeneration

  • get forcedDefaultHitPointRegeneration(): YForcedBool
  • set forcedDefaultHitPointRegeneration(value: YForcedBool): any
  • Allows to **set/**get the default hp regeneration of the character.

    Returns YForcedBool

  • Allows to **set/**get the default hp regeneration of the character.

    Parameters

    Returns any

healthBarVisiblility

hitPoints

  • get hitPoints(): number
  • set hitPoints(value: number): any
  • Allows to get / set hitpoints (health) of target entity.

    Returns number

  • Allows to get / set hitpoints (health) of target entity.

    Parameters

    • value: number

    Returns any

indestructible

  • get indestructible(): boolean
  • set indestructible(value: boolean): any
  • Allows to get / set whenever an entity can be destroyed or not.

    Returns boolean

  • Allows to get / set whenever an entity can be destroyed or not.

    Parameters

    • value: boolean

    Returns any

inventory

  • Returns an array of all items that are in the inventory of a character. Works only with players and NPCs

    Returns YEntity[]

labels

  • Returns all labels attached to an entity as an array.

    Returns YEntityLabel[]

maxHitPoints

  • get maxHitPoints(): number
  • set maxHitPoints(value: number): any
  • Allows to get / set the max hit points of the target entity.

    Returns number

  • Allows to get / set the max hit points of the target entity.

    Parameters

    • value: number

    Returns any

name

  • get name(): string
  • set name(value: string): any
  • Allows to get / set name of target entity.

    Returns string

  • Allows to get / set name of target entity.

    Parameters

    • value: string

    Returns any

position

  • Allows to get / set position of target entity.

    Returns YVector3

  • Allows to get / set position of target entity.

    Parameters

    Returns any

quaternion

respawnCount

  • get respawnCount(): number
  • Returns how many times can player still respawn after death.

    Returns number

respawnPoint

  • get respawnPoint(): YLogic
  • set respawnPoint(value: YLogic): any
  • Allows to Get / Set current Respawn Point of a character.

    Returns YLogic

  • Allows to Get / Set current Respawn Point of a character.

    Parameters

    Returns any

role

  • Returns role of target character.

    Returns YPlayerRole

rotation

  • Allows to get / set rotation of target entity.

    Returns YVector3

  • Allows to get / set rotation of target entity.

    Parameters

    Returns any

team

  • Returns team of target character.

    Returns YPlayerTeam

type

  • Returns thetype of selected entity, e.g ylandium crystal.

    Returns YEntityType

velocity

  • Allows to get / set current velocity of a character.

    Returns YVector3

  • Allows to get / set current velocity of a character.

    Parameters

    Returns any

Methods

addStorage

attachLabel

changeRole

  • changeRole(role: YPlayerRole, resetEquip: boolean, resetInventory: boolean): void
  • Allows to change role of target character.

    Parameters

    • role: YPlayerRole
    • resetEquip: boolean
    • resetInventory: boolean

    Returns void

changeTeam

  • Allows to change team of target character.

    Parameters

    Returns void

damage

  • Will reduce hitpoints of target entity by given amount.

    Parameters

    Returns void

despawn

  • despawn(): void
  • Instantly destroy target entity without visual and sound effect and leave no loot.

    Returns void

disableInteractions

  • disableInteractions(): void

disintegrate

  • disintegrate(): void
  • Instantly destroy target entity with visual and sound effects* and leave no loot.

    Returns void

equip

  • Automatically equips selected item in to target slot of a character, e.g helmet will be placed to head slot.

    Parameters

    Returns void

forceFlying

  • forceFlying(flying: boolean): void
  • Allows to force a character in to the flight mode.

    Parameters

    • flying: boolean

    Returns void

forceRagdoll

  • forceRagdoll(initialForce: YVector3): boolean
  • Exerts the initial force on target player character, forcing the character to ragdoll.

    Parameters

    Returns boolean

getColor

  • getColor(colorId: number): YColor
  • Returns color of selected color channel of target entity.

    Parameters

    • colorId: number

    Returns YColor

getEquippedItem

  • Returns currently equipped item in selected inventory slot* of a character.

    Parameters

    Returns YEntity

getForcedImmunity

  • Returns whether selected immunity override is active onto character .

    Parameters

    Returns YForcedBool

getMovementBonus

  • Returns current speed bonus of character movement.

    Parameters

    Returns number

getResistance

  • Returns selected resistance of the target entity against the specific type of damage.

    Parameters

    Returns number

getState

  • Returns whether selected character state is active.

    Parameters

    Returns number

getStorageData

hasImmunity

  • Returns whether the character has selected immunity type, regardless if it was forced from script or obtained by drinking a potion.

    Parameters

    Returns boolean

hasLabel

  • Returns whether the entity has selected label attached.

    Parameters

    Returns boolean

hasRole

  • Returns whether the target character has selected Player role assigned .

    Parameters

    Returns boolean

hasStorage

hasTeam

  • Returns whether the target character has selected team assigned.

    Parameters

    Returns boolean

is

  • is(klass: YTag): boolean
  • Returns whether the selected entity is of certain class, e.g workstation.

    Parameters

    Returns boolean

isColorable

  • isColorable(colorId: number): boolean
  • Returns whenever selected color channel of target entity can be changed.

    Parameters

    • colorId: number

    Returns boolean

isEquipmentSlotLocked

  • Returns whether the target equipment slot of the target character is locked.

    Parameters

    Returns boolean

isType

  • Returns whether target entity type matches selected type.

    Parameters

    Returns boolean

kill

  • Instantly destroy target entity with visual and sound effects* but leave loot.

    Parameters

    Returns void

lockEquipmentSlot

  • Allows to lock / unlock equipment slot of a character.

    Parameters

    Returns void

paint

  • Allows to apply one color on to all color channels of target object, with paint splash effect.

    Parameters

    Returns void

  • Allows to apply a color on to selected color channel of target object, with paint splash effect.

    Parameters

    Returns void

removeLabel

removeStorage

respawn

  • respawn(): void
  • Respawns the target player.

    Returns void

revertColor

  • revertColor(color1: boolean, color2: boolean, color3: boolean): void
  • revertColor(): void
  • Allows to revert selected color channels of the target entity.

    Parameters

    • color1: boolean
    • color2: boolean
    • color3: boolean

    Returns void

  • Reverts all color channels of target object to default color, without paint splash effect.

    Returns void

setColor

  • setColor(colorId: number, color: YColor): void
  • setColor(color: YColor): void
  • Allows to set color of selected color channel of target entity*.

    Parameters

    • colorId: number
    • color: YColor

    Returns void

  • Allows to apply one color on to all color channels of target object, without paint splash effect.

    Parameters

    Returns void

setCustomInteraction

  • setCustomInteraction(hint: any, interactionId: any, overridesDefault: boolean): void
  • Allows to set custom interaction onto an entity. Hint - text displayed over the entity. Id - identifier used to distinguish interactions (optional). Override default - whenever the interaction will be added to already existing interaction. Work only for charters.

    Parameters

    • hint: any
    • interactionId: any
    • overridesDefault: boolean

    Returns void

setDefaultInteractions

  • setDefaultInteractions(): void

setForcedImmunity

setHotbarSlot

  • setHotbarSlot(slot: number, item: YEntity): void
  • Allows to equip an item to selected character hotbar slot.

    Parameters

    Returns void

setMovementBonus

  • Allows to set bonus to the speed of character movement.

    Parameters

    Returns void

setResistance

  • setResistance(damageType: YDamageType, value: number): void
  • Allows to set the resistance of the target entity against the specific type of damage.

    Parameters

    Returns void

setState

  • Allows to set the current character state.

    Parameters

    Returns void

transformPosition

transformRotation

washColor

  • Allows to revert selected color channel of target object, with paint splash effect.

    Parameters

    Returns void

  • Reverts all color channels of target object to default color, with paint splash effect.

    Parameters

    Returns void

Static damage

Static despawn

Static disintegrate

  • disintegrate(target: YEntity): void

Static is

  • Returns whether the target object is entity or not.

    Parameters

    Returns boolean

Static kill

Static spawn

Static spawnEntity

Static throwEntity

Generated using TypeDoc