Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Accessors

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

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

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

rotation

  • Allows to get / set rotation of target entity.

    Returns YVector3

  • Allows to get / set rotation of target entity.

    Parameters

    Returns any

type

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

    Returns YEntityType

Methods

addStorage

attachLabel

  • Allows to attach Label to target entity.

    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
  • Will disable all entity interactions.

    Returns void

disintegrate

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

    Returns void

getColor

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

    Parameters

    • colorId: number

    Returns YColor

getResistance

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

    Parameters

    Returns number

getStorageData

hasLabel

  • Returns whether the entity has selected label attached.

    Parameters

    Returns boolean

hasStorage

  • Returns whether the target entity has selected Storage 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

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

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

  • Allows to remove Label from target entity.

    Parameters

    Returns void

removeStorage

  • Allows to remove Storage from target entity.

    Parameters

    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
  • Will reset entity interactions to default state.

    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

transformPosition

  • Returns new position which is offset relative to target position and orientation (local space).

    Parameters

    Returns YVector3

transformRotation

  • Returns new rotation which is offset to target entity rotation (local space).

    Parameters

    Returns YVector3

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

  • Parameters

    Returns void

Static disintegrate

  • disintegrate(target: YEntity): void
  • Parameters

    Returns void

Static is

  • Returns whether the target object is entity or not.

    Parameters

    Returns boolean

Static kill

Static spawn

Static spawnEntity

  • Allows to spawn selected entity Prototype at specific position in the world.

    Parameters

    Returns YEntity

  • Allows to spawn entity from a Prototype to a container.

    Parameters

    Returns YEntity

Static throwEntity

  • Throws a projectile spawned from the entity template.

    Parameters

    Returns void

Generated using TypeDoc