Skip to content
Sensors and Detectors
Garry's Mod

Sensors and Detectors

Build smart contraptions with Wiremod sensors in Garry's Mod. Learn to use proximity, raycast, and touch sensors for automated systems.

By ···10 min read·Multi-source verified
1 reading this guide  

Build smart contraptions with Wiremod sensors in Garry's Mod. Learn to use proximity, raycast, and touch sensors for automated systems.

8.6. Sensors and Detectors

Sensors and detectors, primarily utilized within Wiremod, are essential for creating reactive and automated systems in Garry's Mod. They allow your contraptions to perceive and respond to their environment, players, or other entities.

Wiremod offers several sensor and detector entities that enable your creations to gather information about the game world. These are crucial for building intelligent machines, automated defenses, or interactive environments. Some of the most common sensors include the 'Proximity Sensor', 'Raycast Sensor', and 'Touch Sensor'. The 'Proximity Sensor' detects entities within a specified radius. It outputs a signal when an entity enters its detection zone, which can then be used to trigger other components. For example, you could set up a proximity sensor to activate a door when a player approaches. The 'Raycast Sensor' works by firing an invisible ray from its position in a specified direction. If this ray hits an entity, it outputs a signal. This is useful for creating things like laser tripwires or automated targeting systems. The 'Touch Sensor' detects when it is physically touched by another entity. This can be used for pressure plates, trigger pads, or even to detect if a specific object has been placed on a surface. Beyond these, there are also sensors that detect specific types of entities, such as 'Player Detectors' or 'NPC Detectors'. These allow your contraptions to react specifically to players or AI characters. The output of these sensors is typically a boolean signal (on/off) or a numerical value representing distance or hit information. This output can then be fed into logic gates, timers, or directly into actuators like motors or lights to create complex automated behaviors. For instance, a proximity sensor detecting a player could send a signal to a timer, which then activates a trap after a short delay. The ability to integrate these sensors with other Wiremod components opens up a vast realm of possibilities for creating dynamic and responsive contraptions.

Common sensors and their uses:

  • Proximity Sensor: Detects entities within a radius (e.g., automatic doors).
  • Raycast Sensor: Detects entities along a line of sight (e.g., tripwires, laser grids).
  • Touch Sensor: Detects physical contact (e.g., pressure plates).
  • Player Detector: Specifically detects players.
  • NPC Detector: Specifically detects NPCs.

When implementing sensors, consider their range, direction, and the types of entities they should detect. You can often fine-tune these parameters in the sensor's properties. For example, a proximity sensor might have its detection radius adjusted, or a raycast sensor might have its length and direction precisely set. Combining multiple sensors can lead to even more sophisticated behaviors. Imagine a security system that uses a raycast sensor to detect movement and a player detector to ensure it's a player triggering the alarm. The output from these sensors can be fed into logic gates to create complex decision-making processes. For example, an 'AND' gate could require both a player to be detected and a specific button to be pressed before activating a system. Sensors are the eyes and ears of your Wiremod creations, allowing them to interact intelligently with the game world and creating a more dynamic and engaging experience.

100% Human-Written. AI Fact-Checked. Community Verified. Learn how AntMag verifies content