Detecting trains on the track
Posted: Fri Feb 06, 2015 12:06 pm
Hey there everyone!
I've decided to try my hands at modding, and wanted to make a railway crossing, which flashes it's lights when a train is approaching, so I don't die.
An obvious part of the process is detecting an inbound train, to do this, I've been trying to find out how the signals work, however I can't seem to find the code for them.
The signal entity itself just defines that it's type is "rail-signal", but I haven't been able to find anything defining that type anywhere.
If any of you lovely people would be able to point in in the right direction, that'd be awesome
I've decided to try my hands at modding, and wanted to make a railway crossing, which flashes it's lights when a train is approaching, so I don't die.
An obvious part of the process is detecting an inbound train, to do this, I've been trying to find out how the signals work, however I can't seem to find the code for them.
The signal entity itself just defines that it's type is "rail-signal", but I haven't been able to find anything defining that type anywhere.
If any of you lovely people would be able to point in in the right direction, that'd be awesome
