LF PowerGrid

Type to search devices, guides and classnames.

    Wiki
    Logic & Sensors

    Motion Sensor

    Detects nearby players within 15m using raycast and gates power accordingly.

    Loading Motion Sensor…

    Overview

    The Motion Sensor is a proximity-based gating device that detects nearby players within 15 meters using line-of-sight raycast checks. When a player is detected, the sensor opens its gate and allows power to flow downstream. When no players are present, the gate closes and blocks all power. Detect modes can be switched between ALL players, TEAM members only, or ENEMY players only, enabling sophisticated base automation that responds intelligently to different threat levels. Sensors can be paired together to create networked detection zones.

    Specifications

    Property Value
    Type Passthrough (1 IN + 1 OUT) with gate
    Detection Range 15 m
    Detection Method Line-of-sight raycast
    Detect Modes 0=ALL, 1=TEAM, 2=ENEMY
    Power Consumption 5 u/s
    Output Capacity 200 u/s
    Gate Behavior Open on detection; stays open 5 s after last detection
    Pairing Optional group network
    Weight (placed) 800 g
    Weight (kit) 600 g
    Class Name LFPG_MotionSensor
    Base Class LFPG_WireOwnerBase

    How It Works

    The Motion Sensor continuously scans a 15-meter radius around itself, checking for players using line-of-sight raycast checks. When the active detect mode finds a valid target within range, the sensor immediately opens its gate, allowing power to flow from input to output. As long as a player remains visible within detection range, the gate stays open. When all matching targets leave or line-of-sight is blocked, the gate stays open for 5 seconds after the last detection, then closes.

    The detect mode determines which players trigger the sensor: mode 0 (ALL) responds to any player, mode 1 (TEAM) only detects teammates, and mode 2 (ENEMY) only detects hostile players. This allows asymmetric automation where friendly visitors don't trigger alarms but actual threats do.

    LED Indicator

    • Green: Player detected (gate open, power flowing)
    • Red: Powered but no detection (gate closed)
    • Off: No power available

    Wiring Examples

    Auto-Lighting on Entry

    Battery
    Motion Sensor (15m range)
    Ceiling Light

    Lights automatically activate when anyone approaches, providing hands-free illumination at base entrances.

    Team-Only Gate Lock

    Battery
    Motion Sensor (mode=TEAM)
    Door Controller

    Set detect mode to TEAM (group filtering uses the paired LB master group). The door opens when a player matching that filter approaches.

    Perimeter Alarm System

    Battery
    Motion Sensor
    AND Gate (with Switch)
    Ceiling Light (10 u/s)

    TEAM/ENEMY filtering depends on the paired group (LB master groups); without a paired group the filter does not restrict detection. Combine with a manual switch for an armed alarm.

    Tips

    • The raycast check means walls and obstacles block detection—position sensors with line-of-sight to entrances.
    • Use mode=TEAM for base-friendly automation and mode=ENEMY for security systems.
    • Pair multiple sensors together to cover large bases or create networked detection zones.
    • At 5 u/s consumption, motion sensors are power-efficient even when active 24/7.
    • The gate already holds for 5 seconds after the last detection; use a Memory Cell downstream if you need a latched state.
    • Test detect modes and range with different player proximity scenarios before deploying in combat.