Tile - YPreviewObject - Create Preview Object – Ylands

From Bohemia Interactive Community
Revision as of 15:27, 24 November 2023 by Lou Montana (talk | contribs) (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Create Preview Object(Entity type, Position, Rotation)

YlandsTile-1428.png

YlandsTile-1428-rv.png

static create(entityType: YEntityType, position: YVector3, rotation: YVector3): YPreviewObject;

Parameters

entityType

position

rotation

Returns

YPreviewObject

Availability

Client

Description

Creates a preview object from an entity type prototype, on target position with chosen rotation.

Notes

  • Preview objects are temporary, more optimized versions of entities or logic objects.
  • On Tool confirm, all preview objects created via this tile get replaced by entities with identical properties
  • If not spawned via the script or automatically on Tool confirm, these objects are deleted on Tool script end.

Create Preview Object(Logic type, Visual, Position, Rotation)

YlandsTile-1453.png

YlandsTile-1453-rv.png

static create(logicType: YGameLogicType, visual: YPreviewObjectVisual, position: YVector3, rotation: YVector3): YPreviewObject;

Parameters

logicType

visual

position

rotation

Returns

YPreviewObject

Availability

Description

Creates a preview object from an game logic type prototype, on target position with chosen rotation.

Notes

  • Preview objects are temporary, more optimized versions of entities or logic objects.
  • On Tool confirm, all preview objects created via this tile get replaced by game logic objects with identical properties
  • If not spawned via the script or automatically on Tool confirm, these objects are deleted on Tool script end.