BVE WorldWide
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Train Race in OpenBVE using TrackFollowerFunction

Go down

Train Race in OpenBVE using TrackFollowerFunction Empty Train Race in OpenBVE using TrackFollowerFunction

Post by LXQt Thu Apr 11, 2019 1:05 pm

even though I've made another AI Train object,I don't know how to make a Train Race,below is the problem:
1.I want another AI Train to move as the same direction as the player train until 4 minutes later,however the train only kept for about 20-30 seconds
2.Everytime when the train is close to the AI Train,the AI train should move,but now when the train haven't even arrived,the AI Train already moved and after 20-30 seconds,it disappear(I have to wait for few minutes until the AI Train run the same section again which the train already passed it and cannot see the AI Train)
here's my code below,I'm sure I've done something wrong.(Sorry if you don't understand,my main language isn't english) thanks!

[Object]
Position = -12, 0, 0
states = first.csv
StateFunction = if[trackdistance > 200, 0 , min[value + 0.5 * delta / 20 , 1]]
TranslateZDirection = 0, 0, -1.5
TrackFollowerFunction = mod[25 * time, 10000] + 18.9
LXQt
LXQt

Posts : 114
Join date : 2019-02-18
Location : Hong Kong

https://lx862.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum