Skip to content

World Scanner

SuperSpaceEye edited this page Jan 16, 2024 · 1 revision

World Scanner is a block that can get information about any block around itself.

It can scan for blocks world-to-world, ship-to-world, world-to-ship, and ship-to-ship

Functions

getBlockAt(x, y, z, inShipyard)

x, y, z are offsets, so the actual position that scanner will scan is "scanner_pos+offset". If the scanner is on VS2 ship, it will calculate that position, and transform it from local coordinates to global coordinates (with respect to ship rotation). If the position for scanning contains VS ship, it will transform position to that VS ship local space, and try get the block. If both world and VS ship contain block at the same position, it will prioritize VS ship block. x, y, z positions will be floored during block getting. Parameters:

  1. x: Number - offset on x axis
  2. y: Number - offset on y axis
  3. z: Number - offset on z axis
  4. inShipyard: Bool - only if VS2 is installed. If true, then it scans for blocks directly in shipyard

Returns:

  • A table consisting of:
    • "blocks_type": String
    • "ship_id": Number - If the block is on VS ship

Clone this wiki locally