getId
getId: (WorldView) -> numberIts id.
client:getTopLevelWorldView()
client:getWorldView(…)
client:getCameraFocusWorldView()| Method | Returns | Description |
|---|---|---|
getId() | number | Its id. |
isTopLevel() | boolean | Whether it is the top level. |
getScene() | Scene | Its scene. |
getPlane() | number | The local player's plane in it. |
getSelectedSceneTile() | Tile? | The tile under the mouse, on this world view's plane (getPlane()), or nil when the mouse is over none of its tiles. The client finds it… |
getSizeX() | number | Its width in tiles. |
getSizeY() | number | Its length in tiles. |
getBaseX() | number | The world x of its scene tile (0, 0). |
getBaseY() | number | The world y of its scene tile (0, 0). |
getTileHeights() | {{{number}}} | The tile corner heights, [plane][x][y] (1-based in Luau), a side one longer than the scene. A copy: writing it changes nothing. |
getTileSettings() | {{{number}}} | The tile settings, [plane][x][y] (bit 1 blocked floor, bit 2 bridge, bit 4 under roof, ...). A copy: writing it changes nothing. |
getCollisionMaps() | { n: number, [number]: CollisionData? } | One collision map per plane, nil where a plane has none. |
npcs() | NpcSet | The NPCs in it: a set walked with for _, npc in set, looked up with byIndex, counted with #. |
players() | PlayerSet | The players in it, as npcs(). |
worldEntities() | WorldEntitySet | The world entities (boats) in it, by id, as npcs(). |
worldViews() | WorldViewSet | The world views of the world entities in it, as npcs(). |
getGraphicsObjects() | {GraphicsObject} | The spot animations playing in it, in the client's order. |
isInstance() | boolean | Whether it is an instance (the top level's flag; a world entity's world view answers false). |
getInstanceTemplateChunks() | {{{number}}} | The instance template chunks, [plane][chunkX][chunkY], packed as plane << 24 | x << 14 | y << 3 | rotation << 1, -1 where there is none. |
getMapRegions() | {number} | The map regions it covers, ascending. |
contains(WorldPoint) | boolean | (WorldView, WorldPoint) -> boolean: Whether the world tile's x and y are in it (the plane is not tested). |
contains(LocalPoint) | boolean | |
equals(any) | boolean | Whether other equals this WorldView, as == answers it (false for a value of another class). |
| Field | Type | Description |
|---|---|---|
TOPLEVEL | number | The top-level world view's id. |
| Method | Returns | Description |
|---|---|---|
Actor.getWorldView | WorldView | The world view the actor is in: the top level, or a world entity's (a boat's). |
CameraFocusableEntity.getWorldView | WorldView | The top level, whichever world view holds the tile. |
Client.getCameraFocusWorldView | WorldView? | The world view of the entity the camera follows (client:getCameraFocusEntity():getWorldView()), without the entity. A player or an NPC an… |
Client.getTopLevelWorldView | WorldView | The top-level world view (the scene the local player is in; boats have their own). |
Client.getWorldView | WorldView? | World view id, or nil when the client has none with that id. |
GraphicsObject.getWorldView | WorldView | The world view it plays in. |
ItemLayer.getWorldView | WorldView | The world view it is in. |
PreMapLoad.getWorldView | WorldView | The world view the scene is loading for (the top level). |
TileObject.getWorldView | WorldView | The world view the object is in. |
WorldEntity.getWorldView | WorldView | The world view it carries (its id is the entity's). |
WorldViewLoaded.getWorldView | WorldView | The world view. |
WorldViewSet.byIndex | WorldView? | The world view with id index, or nil. |
WorldViewUnloaded.getWorldView | WorldView | The world view. |
getIdgetId: (WorldView) -> numberIts id.
isTopLevelisTopLevel: (WorldView) -> booleanWhether it is the top level.
getScenegetScene: (WorldView) -> SceneIts scene.
getPlanegetPlane: (WorldView) -> numberThe local player's plane in it.
getSelectedSceneTilegetSelectedSceneTile: (WorldView) -> Tile?The tile under the mouse, on this world view's plane (getPlane()), or nil when the mouse is over none of its tiles. The client finds it as it draws the scene, so an overlay reads this frame's. While the menu is open, the tile the menu was opened over (the column its "Walk here" entry was built from), a snapshot taken when the menu opens; nil if the open menu has no "Walk here" of this world view. Raises on a client whose table does not place the client's field, rather than answer nil.
getSizeXgetSizeX: (WorldView) -> numberIts width in tiles.
getSizeYgetSizeY: (WorldView) -> numberIts length in tiles.
getBaseXgetBaseX: (WorldView) -> numberThe world x of its scene tile (0, 0).
getBaseYgetBaseY: (WorldView) -> numberThe world y of its scene tile (0, 0).
getTileHeightsgetTileHeights: (WorldView) -> {{{number}}}The tile corner heights, [plane][x][y] (1-based in Luau), a side one longer than the scene. A copy: writing it changes nothing.
getTileSettingsgetTileSettings: (WorldView) -> {{{number}}}The tile settings, [plane][x][y] (bit 1 blocked floor, bit 2 bridge, bit 4 under roof, ...). A copy: writing it changes nothing.
getCollisionMapsgetCollisionMaps: (WorldView) -> { n: number, [number]: CollisionData? }One collision map per plane, nil where a plane has none.
npcsnpcs: (WorldView) -> NpcSetThe NPCs in it: a set walked with for _, npc in set, looked up with byIndex, counted with #.
playersplayers: (WorldView) -> PlayerSetThe players in it, as npcs().
worldEntitiesworldEntities: (WorldView) -> WorldEntitySetThe world entities (boats) in it, by id, as npcs().
worldViewsworldViews: (WorldView) -> WorldViewSetThe world views of the world entities in it, as npcs().
getGraphicsObjectsgetGraphicsObjects: (WorldView) -> {GraphicsObject}The spot animations playing in it, in the client's order.
isInstanceisInstance: (WorldView) -> booleanWhether it is an instance (the top level's flag; a world entity's world view answers false).
getInstanceTemplateChunksgetInstanceTemplateChunks: (WorldView) -> {{{number}}}The instance template chunks, [plane][chunkX][chunkY], packed as plane << 24 | x << 14 | y << 3 | rotation << 1, -1 where there is none.
getMapRegionsgetMapRegions: (WorldView) -> {number}The map regions it covers, ascending.
containscontains: ((WorldView, WorldPoint) -> boolean) & ((WorldView, LocalPoint) -> boolean)(WorldView, WorldPoint) -> boolean: Whether the world tile's x and y are in it (the plane is not tested).
(WorldView, LocalPoint) -> boolean: Whether the local point is in it.
equalsequals: (WorldView, any) -> booleanWhether other equals this WorldView, as == answers it (false for a value of another class).