It sends a message termed REQUEST_TO_PASS_DANGER forward when the train front end passes the link in the normal direction.
- Code: Select all
function OnConsistPass ( prevFrontDist, prevBackDist, frontDist, backDist, linkIndex )
if frontDist <= 0 and prevFrontDist > 0 then -- front passed link 0 proper
Call( "SendSignalMessage", 4, "", 1, 1, 0)
end
end
I have no idea about TS2015, and they changed these things several times in the past, but as of TS2013, this is what happens:
The user presses TAB.
The system calls GetSignalState for the next stopping signal (i.e., Stopping is eTrue in the .bin file).
If GetSignalState returns 2 which stands for BLOCKED, then the game checks the path ahead. If there are no switches set against the train, then this not-so-immersive pop-up is shown. It looks twice as stupid if the signal clears more or less at the same time.
The system sends message REQUEST_TO_PASS_DANGER (i.e., 4) to the signal concerned, and does not expect an answer to the request.
You cannot clear the call-on on a signal when GetSignalState is called because that is called all the time when a player train approaches, gathering information for in-cab signalling.
If a signal does not return 2 in GetSignalState, then exactly nothing happens as you press TAB.
Clearly it depends on the script of the signal with the call-on whether that will be shown now on receipt of that message.
In short, if the above works, it was a lucky stab in the dark.
On a second thought, I wonder why (or if) you see this pop-up at all, after you placed the AI Only signal in the middle of the platform. Does the signal protecting the platform have a numbered link in the far half of the platform? If its numbered link would be on the near side of the near end of the platform and the track would be clear from there to the AI Only signal, then the game should not see any occupied block at all when you are admitted to the near half of the platform.
Edit: Added an "end" in the code. I was too busy stripping all the other lines from the original - sorry.