Greetings , All !

How can I make a train (player/AI/both) to stop at an outer red signal of a junction/railway station and the signal does not turn green unless and until : -

the PF where the train has to be brought is emptied by the AI train(s) ?

and / or

an AI train crosses my train from that station ?


Thanks in advance