stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. Stationeers wiki
  3. Devices
  4. Motion Sensor

Devices

Motion Sensor

Bewegungssensor

PrefabStructureMotionSensor Hash-1713470563in the hash lookup
Power paintable Game 0.2.6428.27798

Overview

Motion Sensor (StructureMotionSensor) in Stationeers: device, hash -1713470563. With build steps, 6 IC10 logic values and connection diagram.

The motion sensor is the switch for everything that should only run while somebody is around: corridor lights, door openers, a note on a display. It mounts in the 0.5 m grid on a wall, floor or ceiling, needs no power according to the game data and has one shared port for power and data.

What it covers: according to the game code it watches exactly one large cell – the 2 × 2 × 2 m cube it sits in. It remembers every movable object that enters this cell and drops it again as soon as it leaves. That means player characters, but also loose items: if somebody drops something there, the sensor stays triggered until it is picked up again. What somebody carries in hand or inventory does not count separately.

  • Activate is 1 while at least one object is in the cell, otherwise 0. The sensor keeps setting this value itself; whatever you write into it is overwritten right away.
  • Quantity is the number of objects it currently tracks in the cell.
  • On can be read and written. The detection in the game code does not check On, though – do not rely on a switched-off sensor staying quiet.

For a long corridor you therefore need several sensors, one per 2 m section. Give them all the same name and read them with batch mode 0: the average of Activate is above 0 as soon as somebody is anywhere along it.

It is built from the Kit (Sensors), which also builds the gas, daylight, occupancy and proximity sensors. If you need an adjustable range, use the Proximity Sensor; for a whole room, the Occupancy Sensor.

A proven pattern is the light with run-on: every detection resets a counter, and the light stays on until it has run out – 60 ticks for 30 seconds, for example. If the sensor is missing, lbn returns NaN; then it is better to leave the light on. The complete program is in Sensors: gas, daylight, motion, occupancy.

IC10 and logic

6 logic values, 6 readable and 2 writable.

  • Activate RW 9
  • Quantity R 27
  • On RW 28
  • PrefabHash R 84
  • ReferenceId R 217
  • NameHash R 268

Example: address by name

Reads Quantity, shows the value on the IC housing and writes On. Name the device with the labeller first; devices with the same name are addressed together.

# Motion Sensor address by name
define DEVICE -1713470563  # StructureMotionSensor
define NAME HASH("Motion Sensor")  # name in game (labeller)
define TARGET 1  # On 1 = on
alias value r0

start:
yield
lbn value DEVICE NAME Quantity 0  # 0 = average of all with this name
bnan value start  # no device with this name
s db Setting value  # show on the housing
sbn DEVICE NAME On TARGET  # set value
j start

Connections

1
Schematic: inputs left, outputs right, waste on top, power and data at the bottom. Position and spacing do not match the model.
  1. 1Power and data

Building and deconstruction

Grid: small grid (0.5 m) · mounting: on wall or floor

  1. 1

    Place

    Take back with Hand Drill

Total material

Deconstruction returns

Built with: Kit (Sensors)

Raw values from the game code (1)

Field names as in the game code, untranslated. Useful for mods and exact limits.

Sensor.ConnectionTypeFlatExhaustive

See also

  • Sensors: gas, daylight, motion, occupancyWhich sensor measures what, which logic values it delivers and how to combine several sensors cleanly – with a worked example on oxygen partial pressure and two programs.
Esc
↑ ↓ selectEnter open/ opens search anywhere