getWorldView
getWorldView: (WorldEntity) -> WorldViewThe world view it carries (its id is the entity's).
client:getTopLevelWorldView():worldEntities():byIndex(…)| Method | Returns | Description |
|---|---|---|
getWorldView() | WorldView | The world view it carries (its id is the entity's). |
interact(number) | boolean | Op op (1 to 5) of this world entity (a boat). By op number, since a world entity's op texts are not read. Raises for an op outside 1 to 5. |
getLocalLocation() | LocalPoint? | Where it is in the world view it sails in: its fine position now (128 to a tile; world view 0), nil once it is gone. Raises on a client w… |
getOrientation() | number | Which way it faces (0..2047, the client's angle units). Raises once it is gone, and on a client whose table does not place its fields. |
getOwnerType() | number | Who owns it: OWNER_TYPE_NOT_PLAYER, OWNER_TYPE_OTHER_PLAYER or OWNER_TYPE_SELF_PLAYER (the local player's own boat), as the server se… |
isHiddenForOverlap() | boolean | Whether the client draws it hidden because it overlaps another (faded out, as the client fades a boat that overlaps the local player's). Ra… |
getConfig() | WorldEntityConfig? | Its config (the kind of boat it is), nil while it has none or once it is gone. Raises on a client whose table does not place its fields. |
getCameraFocus() | LocalPoint? | Where the camera orbits while it follows the boat (client:getCameraFocusEntity() is the boat then): its getLocalLocation(). nil once… |
transformToMainWorld(LocalPoint) | LocalPoint? | Where point, a local point in this entity's own world view, is in the world view it sails in, as the entity stands and turns now (world v… |
equals(any) | boolean | Whether other equals this WorldEntity, as == answers it (false for a value of another class). |
| Field | Type | Description |
|---|---|---|
OWNER_TYPE_NOT_PLAYER | number | Not owned by a player. |
OWNER_TYPE_OTHER_PLAYER | number | Owned by another player. |
OWNER_TYPE_SELF_PLAYER | number | Owned by the local player. |
| Method | Returns | Description |
|---|---|---|
WorldEntityDespawned.getWorldEntity | WorldEntity | The world entity. |
WorldEntitySet.byIndex | WorldEntity? | The world entity with id index, or nil. |
WorldEntitySpawned.getWorldEntity | WorldEntity | The world entity. |
getWorldViewgetWorldView: (WorldEntity) -> WorldViewThe world view it carries (its id is the entity's).
interactinteract: (WorldEntity, number) -> booleanOp op (1 to 5) of this world entity (a boat). By op number, since a world entity's op texts are not read. Raises for an op outside 1 to 5.
getLocalLocationgetLocalLocation: (WorldEntity) -> LocalPoint?Where it is in the world view it sails in: its fine position now (128 to a tile; world view 0), nil once it is gone. Raises on a client whose table does not place the world entity's fields.
getOrientationgetOrientation: (WorldEntity) -> numberWhich way it faces (0..2047, the client's angle units). Raises once it is gone, and on a client whose table does not place its fields.
getOwnerTypegetOwnerType: (WorldEntity) -> numberWho owns it: OWNER_TYPE_NOT_PLAYER, OWNER_TYPE_OTHER_PLAYER or OWNER_TYPE_SELF_PLAYER (the local player's own boat), as the server sent it. Raises once it is gone, and on a client whose table does not place its fields.
isHiddenForOverlapisHiddenForOverlap: (WorldEntity) -> booleanWhether the client draws it hidden because it overlaps another (faded out, as the client fades a boat that overlaps the local player's). Raises once it is gone, and on a client whose table does not place its fields.
getConfiggetConfig: (WorldEntity) -> WorldEntityConfig?Its config (the kind of boat it is), nil while it has none or once it is gone. Raises on a client whose table does not place its fields.
getCameraFocusgetCameraFocus: (WorldEntity) -> LocalPoint?Where the camera orbits while it follows the boat (client:getCameraFocusEntity() is the boat then): its getLocalLocation(). nil once it is gone; raises as getLocalLocation() does.
transformToMainWorldtransformToMainWorld: (WorldEntity, LocalPoint) -> LocalPoint?Where point, a local point in this entity's own world view, is in the world view it sails in, as the entity stands and turns now (world view 0). What a plugin measures from or tests against the main world goes through this first; for a point in any world view, WorldPoint.fromLocalMainWorld also finds the entity and undoes instancing. nil once the entity is gone. Raises when point is in another world view, and on a client whose table does not place its fields.
equalsequals: (WorldEntity, any) -> booleanWhether other equals this WorldEntity, as == answers it (false for a value of another class).