Page 1 of 1
Storage tanks window
Posted: Sun Sep 18, 2016 1:15 am
by pyanodon
Hello!
I was talking with Nexela about the possibility of have a building similar to the storage tank, but until now we dont know if it´s possible. The idea is have a building where the sprite advance one frame or go back by the amount of fluid inside it. Pretty similar to the storage tank window which "fill" with the amount of liquid, is it possible or a no-no for a noob modder as me?

Re: Storage tanks window
Posted: Sun Sep 18, 2016 5:34 am
by aubergine18
Instead of a window showing fluid, could you use a health bar? So add an entity that has a transparent sprite, and then set it's health percentage based on the fill percentage of the storage tank?
Or are you trying to make the whole building change sprite based on fill level? Like those that move upwards as they fill and then down as their contents are drained? If so, maybe a tank sprite (like a vehicle tank) as that can have 16 sprites (at least) set by direction/orientation of the vehicle. Turrets have up to 64 directions. It would need some coding, but nothing too difficult.
Re: Storage tanks window
Posted: Sun Sep 18, 2016 10:51 am
by pyanodon
aubergine18 wrote:Instead of a window showing fluid, could you use a health bar? So add an entity that has a transparent sprite, and then set it's health percentage based on the fill percentage of the storage tank?
Or are you trying to make the whole building change sprite based on fill level? Like those that move upwards as they fill and then down as their contents are drained? If so, maybe a tank sprite (like a vehicle tank) as that can have 16 sprites (at least) set by direction/orientation of the vehicle. Turrets have up to 64 directions. It would need some coding, but nothing too difficult.
I think the second idea is what i mean. Sorry people for my english, i did a image to help what i wanted to say (of course wont be a cup XD).
You said it´s possible with some coding, what coding we´re talking about? The vehicle tank sprite indeed have 16 sprites but the idea is to not change direction, just change the sprite.
Re: Storage tanks window
Posted: Sun Sep 18, 2016 2:06 pm
by aubergine18
It's the only way I know to change sprite currently, is to use something like a tank or turret which switch to different set of sprites based on their direction. Like nixie tubes use a tank or car to choose their color, it's changing direction to switch to different sprite.