Wireless remote installation
An outpost 200 blocks away is too far for links. A pair of Wireless Network Bridges joins it to your network.
You need: a computer, two Wireless Network Bridges, an Entity Detector named outpost and an Alarm Module named
outpost_alarm.
- Place one bridge near the computer, link the computer to it and name it
link. - Travel to the outpost, at most 256 blocks away in the same dimension, and place the second bridge.
- Place the detector and the alarm there, link both to the far bridge and name them.
- Open either bridge’s form. It lists your unpaired, loaded bridges in range. Choose the other one and select Pair. Both areas must be loaded while pairing, so pair from the outpost, before walking home if needed.
Program
Section titled “Program”// Advanced: a remote outpost (computer). The Entity Detector "outpost" and Alarm Module "outpost_alarm" stand// far away behind a paired Wireless Network Bridge "link". The computer reacts to the outpost's events and// notices when the bridge loses its partner.const outpost = detectors.named("outpost")const alarm = alarms.named("outpost_alarm")const link = bridges.named("link")global visits = 0
on outpost.entityEnter(entity) { visits++ if entity.hostile { alarm.activate() }}
on outpost.disconnected { print("The outpost is out of reach. Is its area loaded?")}
on outpost.connected { status = link.status() print("Outpost back online, " + str(status.distance) + " blocks away")}How it works
Section titled “How it works”- To the program, the outpost devices are ordinary network devices: the bridges are invisible.
- When you walk home, the outpost’s area unloads. Its devices become unreachable and
disconnectedruns. When you go back,connectedruns. Bridges never keep chunks loaded. link.status()reports the pairing and the distance.
Keep the outpost working while you are away
Section titled “Keep the outpost working while you are away”While the outpost is unloaded, nothing there runs. While it is loaded but your home is not, a computer program cannot run either, but an autonomous alarm at the outpost keeps working.