Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Junction Switches on Map Demo
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
71.305 KB
4 Nov, 2019 @ 1:07pm
1 Mar, 2022 @ 4:21pm
4 Change Notes ( view )

Subscribe to download
Junction Switches on Map Demo

Description
This is a demo vehicle that shows how rail junctions can be shown on a LUA map.
Note: to be practical you need to mod the signals too. There is a collection of compatible signals here

This vehicle consists of 3 parts:
* a dummy signal.
* a old/vanilla version of remote junction switch
* a junction map view

You can switch signals by touching the marker.
The marker shows the direction of the switch (black line) and the state of the switch (green)
The marker is blue when the signal is polled and red when it's state was changed.

The control station sends pings automatically, but you can press P to manually update.

Note the Unique ID of a signal is based on it's position, so dragging the dummy signal around may cause phantom signals to show up on the map display. They will time out after a while.

Radio signals on Frequency 440:
bool1: legacy/vanilla switch command
bool2: current switch state of signal
bool3: ping command (triggers reply with position, compass and state from the signal)
bool4: switch state command
num1: GPS X
num2: GPS Y
num3: compass (arrow facing away from the diverging tracks)

The ping command is sent by the map.
The switch state command should include the position of the switch to be toggled, that's how the switch knows to respond to it.

Each switch will wait replying to a ping by some random-ish time that depends on it's position so that multiple switches don't collide their radio transmissions.

This is a work in progress.

Please don't re-upload this vehicle.

You can use the MicroControllers in your vehicles, but you must give me credit by linking to the items in your description, you can find them here:
Map
Junction controller

The map view is a modified version of this item