Road

VendaV

New member
Hi,
cars always turn left, but i have a question, can i order car to turn randomly? I have ATLS but it is useless when cars always turn left.
P.S. i cant scripting :) .
Thx
 
If you change the value of the "istrack" line in the config.txt file of a road spline from 0 to 1, then you can place trackside objects on the road, including junctions (as Trainz then considers the spline both a road spline and a track spline). This, along with an object that can automatically flip junction levers (such as placing an AJS Traffic Controller nearby, connecting it to an invisible track junction placed especially for it, and using MiZi's Junction Link to link that to the actual road junction) allows the turning direction at road junctions to be nearly random.

This should work in TS2010 and earlier. I don't know if N3V have changed something to prevent this in TS12. I hope they haven't, for while this is clearly not a "feature" that was intentional, it is certainly a good feature, as it allows one to have more realistic road traffic.
 
Sorry, I should have posted a more newbie-friendly explanation with that.

If you don't already have it, download the AJS Traffic Controller (<kuid2:122285:1159:3>) and MiZi's Junction Link (<kuid:122381:10003>) from the DLS.

Locate the road spline of your choice in Content Manager, and open it for edit in Explorer. Open the config.txt file, find the line that says "istrack 0", and change it to "istrack 1". Save the file, then commit the asset in Content Manager.

Note that the road spline you modified will now be located in the Track tab, instead of the usual Objects -> Splines tab, as Trainz now considers the road spline to also be a track spline.

In the below screenshot (click the thumbnail to see the full-size image), I have placed a Y-junction using a road spline modified as described above, and placed an invisible, silent junction lever (I use "Strab Weiche unsichtbar", <kuid2:69084:38023:2>). Cars coming from the bottom-left of the screen will turn in the direction the junction is set to.



In the above screenshot, I've also placed an AJS traffic controller (the stretch of invisible track with the big red arrow on it). Place a short stretch of invisible track (here I used "AJS Track Eraser" (<kuid2:122285:1003:1>), the same track the Traffic Controller uses) with a Y-junction from the opposite end of the Traffic Controller from the one the red arrow is pointing at, as seen in the below screenshot, and place an invisible junction lever on it.



The Traffic Controller will automatically flip the junction lever it is connected to according to the intervals set in its Properties dialog. Click the question-mark ("?") button in the Objects tab and click on the Controller to open its Properties dialog. Set both of the phase timing settings to 1 second. This will cause the Controller to flip its junction lever every second. If you want the Controller to leave the junction set to one direction longer than the other (to make it more likely that cars will turn in one direction than the other), set one of the phase settings to a higher number of seconds.

Now we need to link the Controller's junction to the road junction. Place a Junction Link (the little red cube between the two junctions in the above screenshot), open its Properties dialog, fill in the Junction 1 and Junction 2 slots with the two junctions, and you now have a road junction where cars will turn in both directions.

Hope this helps,

Zachary.
 
A good find this Retro !

I've just tried it out (without the traffic controller) and it works fine. I wonder if ASB would stop cars passing through each other ? Maybe "Boat" could make up a road control pack ?

Chris
 
A good find this Retro !

I've just tried it out (without the traffic controller) and it works fine. I wonder if ASB would stop cars passing through each other ? Maybe "Boat" could make up a road control pack ?

Chris

Did you try it in TS12? If so, is your TS12 installation pre-SP1 or does it have SP1 applied? I'm curious if this trick still works in the latest versions of Trainz (TS2010 is the latest version I own).

The Traffic Controller/Junction Link setup is only necessary if you want the cars' turning direction to automatically change. Of course, a simpler setup would probably be possible if there was a single object that could automatically flip the road junction directly.

I doubt cars would activate triggers, so an ASB system for cars probably isn't possible. I wish they could, as that would allow stuff like functioning stop signs.

I changed istrack but i cant use junction.

Interesting. I assume you're using TS2009 based on that being the only station stop icon next to your username, so it should work. Is the road spline you're trying to add the junction to in Trainz the same one you made the "istrack" change to in Content Manager?
 
Back
Top