Hi,
I'm new at simutrans developing. I have been researching to create a new addon, I couldn't find an useful document for my aim. I built an autobahn and I want that the vehicles use both sides of the road. For example;
if car_current_speed > 120 (or 125)
use left side
else
use right side
And another problem is that the vehicles wich are on the autobahn wait the vehicles come from ancillary road.
ceap = car_entering_to_autobahn_position
if ceap_left_box+2=free or ceap_right_box+2=free
enter autobahn
else wait
How can I make it?
Simple answer: You can't, I'm sorry to say. Vehicles always travel in both directions on roads (one-way signs merely prevent traffic from p****ing the sign in one direction); and there is, unfortunately, no scripting available for addons.
But there is a overtake patch. Vehicles use the left side when they are overtaking. I think it should be modifyed.
Great. Simutrans is open source. Learn how to program and modify it. :)
It's true, the overtaking patch was done somewhat recently, but there are extremely special and limited instances when it can apply. The entire p**** is checked before it is allowed to happen.
1. The vehicle must be able to p**** in the space available
2. No intersections (because citycars turn randomly)
3. No oncoming traffic in the amount of space calculated to be needed
In other words, it is more like a graphics hack than anything else.