Page 1 of 1

Water Flood script

Posted: Mon Dec 29, 2014 12:25 pm
by Haxina
So, last night i made this script for ZyrVoX. Just thought i would make it a little nicer then share it :)

Water Flooding script

Any ideas for improvements is always welcome :)

Posted: Mon Dec 29, 2014 11:36 pm
by zaroba
Nice script.

Could be used for tidal changes and seasonal changes.
Would be interesting to see it tied somehow into farming as well. Like rice fields needing to be near a river so annual floods can cover them with water and these would be the only times that rice could be grown and harvested.

Now just need mit to remove the mandatory black screen reload from sea level change.

Posted: Tue Dec 30, 2014 1:59 am
by Mit
nice tidy lil script that :).
yeh on the screen fader. thats just mad.

Posted: Tue Dec 30, 2014 11:12 am
by Haxina
Thanks :)

Yeah sounds like a good idea zar. I'm just not sure if that's possible, as the script needs to know the tile's Z (up) axis so the script can compare the water level with the tile's Z axis, and i might have missed it but i can't find anything in the docs that can return the Z axis :/
I don't think there's anything yet to find out how close water is to 'something' yet either, so i guess that'd be 2 requests for mit. :)

Btw i updated the script, found a lil' bug when it reached max level.

Posted: Tue Dec 30, 2014 5:04 pm
by zaroba
Haxina wrote:Thanks :)

Yeah sounds like a good idea zar. I'm just not sure if that's possible

Farm part is easily possible.

Manually set building zones for the farm type
certain crops wont grow unless $waterHeight is over whatever.

Actually, would probably need to use a servervar to make it work.