Openbve News and Development

OpenBve Development => Openbve Development => Topic started by: Moonoo1234 on May 15, 2021, 08:23 AM

Title: How to curve a new rail and have the train follow that track
Post by: Moonoo1234 on May 15, 2021, 08:23 AM
Hey. So I wanted to make a curve in a rail so that the express and local tracks do not meet. I tried to curve ONLY the players rail to where the other rails remain straight. For some reason I CAN NOT. Do I have to code in a new curved rail, or is there a way for me to curve the players rail ONLY.
Title: Re: How to curve a new rail and have the train follow that track
Post by: Trainkidkris on May 15, 2021, 07:35 PM
If you curve the players rail all the rails in the world will move. You will need to shift each rail a certain distance apart every 25 meters or you will need to create an optical illusion by putting those rails as Freeobjs.
Title: Re: How to curve a new rail and have the train follow that track
Post by: Moonoo1234 on May 15, 2021, 10:13 PM
so what command do i use to shit the rail every 25m
Title: Re: How to curve a new rail and have the train follow that track
Post by: Trainkidkris on May 16, 2021, 04:07 AM
We for 1 I don't know about thing shitting the rail related. But to shift your rail as I said you will need to  move them a certain distance every 25 meters till you get your desired shape. This means you can do this.

Example:
3000,.rail 1;4
3025,.rail 1;7
3050,.rail 1;9
3075,.rail 1;11
4000,.rail 1;13

You shift the rails you want with to move a certain distance to get your desired shape.
Title: Re: How to curve a new rail and have the train follow that track
Post by: Moonoo1234 on May 16, 2021, 02:13 PM
thank you. It worked but the train keeps going straight instead of following the curves track. Is there a fix to this?
Title: Re: How to curve a new rail and have the train follow that track
Post by: Trainkidkris on May 16, 2021, 06:24 PM
I said this to you. You need to curve the rail using .curve. When you curve the rail for player 0 "ALL RAILs IN THE WORLD WILL MOVE AND YOU WILL NEED TO CREATE AN OPTICIAL ILLUSION or shift them using the rail command I just gave you"