Panel
An object representing a signal panel.
See also Signal Modules.
1 Entry Points
OnSignalOnTrain()
This function is called whenever a train passes one of the signals referenced by the panel.
- Object “Train” is automatically declared and may be used to access the train in question.
- Object “Signal” is automatically declared and may be used to access the signal in question.
OnSignalCanClear()
This function is called when a signal on the panel is about to clear and all (?) other conditions for obtaining the route have been satisfied.
- Object “Train” is automatically declared and may be used to access the train in question.
- Object “Signal” is automatically declared and may be used to access the signal in question.
- This function doesn’t seem to be called for signals wanting to set routes to signals not a part of the panel.
- Use
return TRUE;
to allow the signal to clear, or return FALSE;
to prevent it from clearing.
OnSignalCanRouteTo()
This function is called when the signalling system is about to set a route to a signal reference by the panel and all (?) other conditions for obtaining the route have been satisfied.
- Object “Train” is automatically declared and may be used to access the train in question.
- Object “Signal” is automatically declared and may be used to access the signal in question.
- Use
return TRUE;
to allow the signal to clear, or return FALSE;
to prevent it from clearing.
2 Functions
Call(string functionname);
Calls the specified function (entry point) in a panel’s script. There is currently no support for passing arguments with the function call. A value may be returned from the called function.
signal GetSig(string id);
Returns the signal on the panel with specified signal id. You can use wildcards in id.
import