Tile - YEntity - Spawn Entity – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:


==== type ====
==== type ====
Entity type to spawn


==== count ====
==== count ====
Stack size


==== position ====
==== position ====
Target position


==== orientation ====
==== orientation ====
Target rotation


=== Returns ===
=== Returns ===


'''YEntity'''
'''YEntity'''
=== Availability ===
[[Ylands:Tile Availability - Server|Server]]


=== Description ===
=== Description ===


Allows to '''spawn''' selected entity '''Prototype''' to world, either at specific position or in to a container. Item count cannot be higher than entity stack size, instruction will always create only one entity instance.
Allows to '''spawn''' selected entity '''Prototype''' at specific position in the world.
 
=== Notes ===
 
* Item count cannot be higher than entity stack size, instruction will always create only one entity instance.


== Spawn Entity(Type, Item count, Target) ==
== Spawn Entity(Type, Item count, Target) ==
Line 37: Line 53:


==== type ====
==== type ====
Entity type to spawn


==== count ====
==== count ====
Stack size


==== container ====
==== container ====
Target container / inventory


=== Returns ===
=== Returns ===


'''YEntity'''
'''YEntity'''
=== Availability ===
[[Ylands:Tile Availability - Server|Server]]


=== Description ===
=== Description ===


Allows to '''spawn''' entity from a '''Template''', either at specific position or in to a container.
Allows to '''spawn''' entity from a '''Prototype''' to a container.


== Spawn Entity(Template, Position, Rotation) ==
== Spawn Entity(Template, Position, Rotation) ==
Line 60: Line 86:


==== template ====
==== template ====
Entity template to be spawned


==== position ====
==== position ====
Spawn position (vector)


==== orientation ====
==== orientation ====
Spawn rotation (vector)


=== Returns ===
=== Returns ===


'''YEntity'''
'''YEntity'''
=== Availability ===
[[Ylands:Tile Availability - Server|Server]]


=== Description ===
=== Description ===


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


=== Notes ===
=== Notes ===
Line 87: Line 123:


==== template ====
==== template ====
Entity template to be spawned


==== container ====
==== container ====
Target container / inventory


=== Returns ===
=== Returns ===


'''YEntity'''
'''YEntity'''
=== Availability ===
[[Ylands:Tile Availability - Server|Server]]


=== Description ===
=== Description ===


Allows to '''spawn''' selected entity *''Prototype'' in to a container.
Allows to '''spawn''' selected entity '''Template''' in to a container.


=== Notes ===
=== Notes ===

Revision as of 11:16, 12 November 2021

Spawn Entity(Type, Item count, Position, Rotation)

YlandsTile-287.png

YlandsTile-287-rv.png

static spawnEntity(type: YEntityType, count: number, position: YVector3, orientation: YVector3): YEntity;

Parameters

type

Entity type to spawn

count

Stack size

position

Target position

orientation

Target rotation

Returns

YEntity

Availability

Server

Description

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

Notes

  • Item count cannot be higher than entity stack size, instruction will always create only one entity instance.

Spawn Entity(Type, Item count, Target)

YlandsTile-288.png

YlandsTile-288-rv.png

static spawnEntity(type: YEntityType, count: number, container: YEntity): YEntity;

Parameters

type

Entity type to spawn

count

Stack size

container

Target container / inventory

Returns

YEntity

Availability

Server

Description

Allows to spawn entity from a Prototype to a container.

Spawn Entity(Template, Position, Rotation)

YlandsTile-129.png

YlandsTile-129-rv.png

static spawn(template: YEntityTemplate, position: YVector3, orientation: YVector3): YEntity;

Parameters

template

Entity template to be spawned

position

Spawn position (vector)

orientation

Spawn rotation (vector)

Returns

YEntity

Availability

Server

Description

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

Notes

  • Item count cannot be higher than entity stack size, instruction will always create only one entity instance.

Spawn Entity(Template, Target)

YlandsTile-128.png

YlandsTile-128-rv.png

static spawn(template: YEntityTemplate, container: YEntity): YEntity;

Parameters

template

Entity template to be spawned

container

Target container / inventory

Returns

YEntity

Availability

Server

Description

Allows to spawn selected entity Template in to a container.

Notes

  • Item count cannot be higher than entity stack size, instruction will always create only one entity instance.
  • Works also for players and NPCs.