Page 1 of 1

[Train] Better signals, need help

Posted: Tue May 27, 2014 1:55 pm
by Tami
Hi, i want to program something new about signal behavior, but i cant find the normal current used signal system to learn something about, how it works. I have never used LUA so far, but if i can see the original source about signals, it might possible i can learn something about it and change something there.

My goals is to improve the range of a signal so it checks not only the next block after this signal, it also checks the next block after the next signal on the Path, the train goes, not on pathes the train dont go.

signal2.jpg
signal2.jpg (222.93 KiB) Viewed 2736 times
Block1 is red when Block2 is red. You can change the deepth of the sidnals. 1 is standard (Block after Signal). 2 is Block after the Signal after upcomming Block after the Signal and so on.

Re: [Train] Better signals, need help

Posted: Tue May 27, 2014 3:17 pm
by FreeER
the rail signals are in the data\base\prototypes\entity\entities.lua file with a type (and name) of "rail-signal", however you won't be able to do what you want with lua. The signal functionality is hard coded with C++...