It's been awhile (more like a year) since I last played around with scripting, at that time a (now failed) DFI.
Now, I'm in the process of creating my local railroad signalling, which of course needs a script.
But I'm having a hard time understanding the lexicon article....
1. The signal has 6 lamps, with 8 different states (6 continuously lit and 2 blinking ones). So far, I've declared a public variable for each state, to control each lamp's night texture.
The article mentions to declare the signal terms (Begriffe) in the object properties, I've done this as well, but how are these then assigned to each state?
2. is the mentioned "signalstate" variable a system variable like "trafficlight_phase"?
3. Does the value of "signalstate" have to be the power of 2, or is this just an example?
Please help me understand this better.
And if not yet completely possible, maybe how to "cheat" it a bit?