Page 1 of 1

Time-varying objects (NML)

Posted: 01 Feb 2021 15:27
by yazalo
I haven't found a solution on the forum or in the NML documentation, so... It is possible that my problem is unsolvable.
Now to the point: I want to add an object (eyecandy) in NewGRF, which in the years before xxxx will have one view (separate sprite) and later (after xxxx) another one (second separate sprite).
But, if that's not possible, I'd like to make at least an object that uses one sprite for xx years after it's built, and then from another.
I know I can achieve the latter using animation, but here: https://newgrf-specs.tt-wiki.net/wiki/N ... tion_speed animations are only limited to 2.5 years, and I want it for more. It's not a problem because I can do one animation multiple times, but I would like the effect to be like this: 1st sprite (for ~25 years) -> 2nd sprite (for ~1 day) -> 3rd sprite (for ~1 day) -> 2 -> 3 -> 2 -> 3 -> 2 -> 3 (until the end of the world, or the game :twisted: )...
Does anyone know how to program something like this? ?( I would be grateful for any hints :D

Re: Time-varying objects (NML)

Posted: 01 Feb 2021 16:36
by isaacrdc
Use the variables available from here https://newgrf-specs.tt-wiki.net/wiki/N ... _variables

Re: Time-varying objects (NML)

Posted: 01 Feb 2021 16:45
by yazalo
Woow... Thanks a lot, I didn't find that site :bow: Sorry for the mess :oops: