Time-varying objects (NML)

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
yazalo
Engineer
Engineer
Posts: 21
Joined: 18 Jan 2021 09:14
Location: Poland

Time-varying objects (NML)

Post 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
isaacrdc
Engineer
Engineer
Posts: 37
Joined: 22 Jul 2019 14:07

Re: Time-varying objects (NML)

Post by isaacrdc »

Use the variables available from here https://newgrf-specs.tt-wiki.net/wiki/N ... _variables
Fromerly known as Alon
User avatar
yazalo
Engineer
Engineer
Posts: 21
Joined: 18 Jan 2021 09:14
Location: Poland

Re: Time-varying objects (NML)

Post by yazalo »

Woow... Thanks a lot, I didn't find that site :bow: Sorry for the mess :oops:
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests