WireSensor
Notices things inside its collider (usually a trigger): output “Out” is 1 while anything is there, and “Count” says how many. A pressure plate, a doorway that opens as you come, a finish line.
Part of the Contraptions module: Contraptions, Garry’s Mod and Wiremod style: building tools used while the game runs (SandboxTools), welds, ropes and thrusters, wiring with buttons, sensors, gates, lamps and displays, and the Contraption template.
Requires: Collider (the area it watches, usually a trigger)
Properties
Section titled “Properties”Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.
layers: text = null. The collision layers it notices, e.g. “Player”. Empty notices anything with a Body. (Names collision layers: their names, separated by commas.) (Field: a name.)
Outputs
Section titled “Outputs”What anything can read with no code: a Counter’s, Bar’s or Text’s output, a Contraptions Wire’s output as its signal; Text shows names too, the rest read numbers, true as 1.
Count(a whole number). How many things are inside it.Out(true or false). True while anything is inside it.
While the game runs
Section titled “While the game runs”Not saved with the scene; scripts read them, and entity_get shows them as live while the game plays.
count: a whole number. How many things are inside it.out: true or false. True while anything is inside it.
Scripts use it as WireSensor: its methods, events and values that aren’t saved with the scene.