Tile - YEntity - Spawn Entity – Ylands
Jump to navigation
Jump to search
No edit summary |
Lou Montana (talk | contribs) m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}") |
||
Line 150: | Line 150: | ||
---- | ---- | ||
{{Navbox/Ylands}} | {{Navbox/Ylands}} | ||
{{DEFAULTSORT:{{#sub:{{PAGENAME}}| | {{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}} | ||
[[Category: Instructions]] | [[Category: Instructions]] |
Latest revision as of 14:27, 24 November 2023
Spawn Entity(Type, Item count, Position, Rotation)
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
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)
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
Description
Allows to spawn entity from a Prototype to a container.
Spawn Entity(Template, Position, Rotation)
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
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)
static spawn(template: YEntityTemplate, container: YEntity): YEntity;
Parameters
template
Entity template to be spawned
container
Target container / inventory
Returns
YEntity
Availability
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.