AI Junction setting

chili46

Member
Okay, I have a long section of double track with multiple blocks (using Track Circuity Detector/Insulator and signals) in each direction. This allows for trains to "stack up" behind each other. That part works great. Here's my problem. An AI train entering the first block will turn the junction at the end even though there are several blocks in between. Is there a way to prevent the junction from being turned until the AI train is in the last or next to last block before the junction? So far I haven't found anything that even remotely addresses this issue. What I was hoping for is a trigger rule that can turn junctions when arriving at a specific location, but maybe it is not a single rule and is a combination of rules or just plain isn't possible. :(
 
Trigger check with set junction should do just that
Here used in my route NederlandWest6
it has 43 trains driving same time, 5k+base boards and i just needed to force 1 junction, for a return trip from Zandvoort(at sea) to Haarlem
all trainz just drive with simple commands no advanced path rules used whatsoever, if the route is good, it dont need those.
trigjunc.jpg
 
You had a fantastic idea, but it isn't working for me. The problem is when an AI plots a route, it will turn junctions ahead on that path. In my case, once the AI enters the path, the next junction is the end junction so it gets turned. I want the junction to stay in the default position until the AI is in the final block of that path. The double tracks are directional and each has 5 blocks. There are no exits once the AI enters the path.

Now, I did look at putting an invisible junction and a short invisible track just before the exit (beginning of block 5) and that seems to work, but could be problematic and prone to derailments. I might be able to use the set junction two different ways: Lock the end junction so the AI can't change it and then in block 5 add a trigger and a child process to turn the junction. Haven't tried that yet, but am thinking it might work.

If you know of a process or action that will prevent AI from turning junctions, I would really like to hear about it.

Again, thanks for your input!
 
Yes, that's the way I set it up, but if I understand the programming sequence, that only takes effect when the trigger is activated. So I believe I tried setting two triggers, one before entering the path to set the junction to the default setting and preventing the AI from making any more changes and then a second trigger and child process to turn the junction when the AI entered block 5.

Like I said, I think I tried that, but will take another look at it.
 
A TM in the last block and drive via it. This should not set the junction as the next driver command does not take the train beyond the TM to the junction. The path will set once the TM is reached.
 
A TM in the last block and drive via it. This should not set the junction as the next driver command does not take the train beyond the TM to the junction. The path will set once the TM is reached.

Thanks StageCoach! It works perfectly! I have the TM placed at the beginning of block 5 and the turnout stays in the preferred position until an AI hits the TM. If another train is approaching after the TM is passed, the turnout doesn't change until they have entered the other path. Couldn't be happier with the way it's working.
 
Look for the simple things first as they often work better than the complicated workings.

In other words, don't over think it. Of course, knowing all the ins and outs of the difference objects (all 600K+) helps too. :hehe:

I really appreciate your knowledge of the inner-workings of Trainz!
 
GM, I wanted to get back to you on this. Your idea of using the set junction did not do what I wanted, but definitely fixed another problem at the same junction. Thanks!!

j8ubKdeicXdLK2uOSXmjVGYHJ04Brcma6OcBWl1SydDZz1TZjyZqM1C4RMG2YTJbvEmdoBQEQAAEQAAEVgf8D8YN3h06w4WAAAAAASUVORK5CYII=

[kind of new at this, so I wasn't able to get the images to show up]

T1 is several miles from J1 and is set to trigger only only from WB traffic. Once triggered, J1 is set to the left and locked. Any traffic approaching from the EB path will not be able to turn J1. Once the west bound traffic triggers T2, J1 is released and can be set by other EB traffic. This works great and really is needed on large layouts even when signaling is setup and working correctly, but the distance is too great for the signals to be set correctly.
 
Last edited:
hiya Chili


To show a pic on these forums:
-I made an account on a free picture host, FI imgbb.com
-once done you can make a folder with your screens
-upload from your pc, then there are a few options how to link a pic
here on the forums I often use "BBcode medium linked", it shows a smaller pic and when clicked on you go to the full pic
just copy the code and add to your post here on forum.


to return to the topic
but the distance is too great for the signals to be set correctly.
You can add more signals along the line (even hidden signals exist and work),
what i do here, before every junction deviating from the mainline i have a signal.
and also at every sideline that gets on to the mainline.
If a line is very long I subdivide in "blocks' by adding extra signals (is done in my country)


By working on that Set Driver Condition Rule, I learned all signals get found and loaded here, but not triggers somehow


its a lot of trial and error, but well worth it ;-)
greetings GM
 
The problem with adding more signals (hidden or otherwise) on a bi-directional path means that at some point you could (will) end up with two trains head-on and no where to pass. The trigger and set junctions implementation solves that problem.

As far as the images go, yeah, I probably knew that. In my Call of Duty clan days, we used to share pics that way and I had an account on photo bucket. Don't know if it's still good, but I'll check out your recommendation too.

Thanks GM,

Chili
 
Okay, GM, here's the pictures. Should the tags be showing?


[IMG][URL="https://imgbb.com/"][IMG]https://i.ibb.co/WzFLGgp/Set-Junction-Anton-West-T1.jpg[/URL][/IMG]
This is the trigger at the beginning of the long bi-directional path.


Set-Junction-Anton-West.jpg
[/URL][/IMG]
This is the junction and trigger at the two directional paths.
 
Last edited:
hiya chili,
this is an alternative for righthand drive (for left hand flip it)
s= signal, no triggers used, direction markers optional





best to copy the code from ibb direct ,btw your pics show fine,
no need for extra img tags

greetings GM
 
Last edited:
Back
Top