Any way to know the exact index of the terminal station of a route in animated?
2 posters
Page 1 of 1
Any way to know the exact index of the terminal station of a route in animated?
Hey, I have been working on some destination-related animated stuff for trains, but it seems as if there is no way I can return the index of the terminal station, is there actually a way or can it be a possible addition?
NYCT_Railer- Posts : 9
Join date : 2020-04-25
Re: Any way to know the exact index of the terminal station of a route in animated?
That's an easy one for once
Build from today will add the instruction TerminalStation to animated files.
This returns as follows:
* Working downwards from the last station, the first station of type Terminal.
* If no station with the type terminal is defined, returns the last station.
(An alternative nasty workaround would be to check the distance to station indices. If a station index does not exist, the distance returned is *exactly* zero, and it'd be possible to determine the final station by starting at say station 15 and working downwards to the first non-zero distance. Wouldn't reccomend this though for obvious reasons)
Edit:
Just found a minor bug as a consequence of this.
The first station in a route cannot be set as a Terminal type. This will now generate a warning & reset the station to a standard type.
Edit 2:
The first station can't be set to Change Ends or Jump either, again both will now generate warnings.
(None of these cases worked in any sensible way to start with, either froze or generated a spurious terminal station message, so no loss)
Build from today will add the instruction TerminalStation to animated files.
This returns as follows:
* Working downwards from the last station, the first station of type Terminal.
* If no station with the type terminal is defined, returns the last station.
(An alternative nasty workaround would be to check the distance to station indices. If a station index does not exist, the distance returned is *exactly* zero, and it'd be possible to determine the final station by starting at say station 15 and working downwards to the first non-zero distance. Wouldn't reccomend this though for obvious reasons)
Edit:
Just found a minor bug as a consequence of this.
The first station in a route cannot be set as a Terminal type. This will now generate a warning & reset the station to a standard type.
Edit 2:
The first station can't be set to Change Ends or Jump either, again both will now generate warnings.
(None of these cases worked in any sensible way to start with, either froze or generated a spurious terminal station message, so no loss)
Re: Any way to know the exact index of the terminal station of a route in animated?
Thank you so much! I really appreciate it, works flawlessly to my needs, I will report any mishaps hereĀ
NYCT_Railer- Posts : 9
Join date : 2020-04-25
Similar topics
» Is there a OPENBVE route with the highest number of animated objects?
» Objects in an animated container disappear in Routeviewer and OpenBVE after the insertion point of the .animated file
» How do I know when approaching a station?
» Performance Index indication needed?
» Cannot load a route, fails with "The selected route is corrupt: No objects defined."
» Objects in an animated container disappear in Routeviewer and OpenBVE after the insertion point of the .animated file
» How do I know when approaching a station?
» Performance Index indication needed?
» Cannot load a route, fails with "The selected route is corrupt: No objects defined."
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|