@Bill69 - This works well when you want to shorten the trigger distance (e.g. for stations adjacent to a crossing (though in the UK at least the crossing would close anyway)), but I think WileeCoyote is looking to extend the distance so the barriers go down earlier. I have worked out a way to do this, but it's so awkward to implement that I hesitate to try to explain...
But, as you asked nicely, I will try...
You will need:
AJS Traffic Controller
Trigger Check rule
Set Switch Rule
A Level Crossing of your choice (preferably one that adjusts to the attached track.
An invisible points lever.
Layout:
Place your crossing.
Lay the track through it, BUT DO NOT ATTACH IT. It should only look connected.
Place an AJS traffic controller nearby, one for each track through the crossing.
From the tree end of the AJS traffic controller, lay a short length of track, then from the end of this form a junction with 2 short branches. Place the switch on this junction and give it a meaningful name. From the right hand branch, join this to one of the crossing tracks with invisible track. Repeat for each crossing track.
Place a trigger on the approach and exit of each track of the crossing. Give them meaningful names. Reduce the trigger radius if desired (advanced tab - 3rd icon). These will be the triggers for the crossing.
Session data:
Go to the session rules icon at the top of the screen, and add the following rule for each track:
Check trigger rule - select the approach trigger (lower gates).
Set Switch rule - Set the switch for the AJS traffic controller connected to the appropriate track to point to the RH branch.
Check Trigger rule - select the clear trigger (raise gates)
Set Switch rule - Set the same switch to point left.
Repeat this for each track through the crossing.
All of the above assumes that each track is single direction. Bi-directional working is possible, but probably even harder. I think it will need a set trigger with a large radius in the middle of the crossing, and two clear triggers (one each end) with very small radii just outside the radius of the middle trigger. It should then work...
As you will have noticed, much of this is contained in session data, so it is vital to provide a base session if you upload a map using this technique.
I hope this helps... I realise it's very complex, but it does work, and work well!
Please ask if there is anything that isn't clear - If I have time I may post some pics...
Paul