Water Flood script

Forum Archive - from http://theuniversal.net
Locked
Haxina
VIP
VIP
Posts: 63
Joined: Thu Oct 17, 2013 4:25 pm

Water Flood script

Post 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 :)
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post 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.
User avatar
Mit
Staff
Staff
Posts: 3551
Joined: Sun Sep 21, 2003 10:14 pm
Location: Unknown

Post by Mit »

nice tidy lil script that :).
yeh on the screen fader. thats just mad.
Haxina
VIP
VIP
Posts: 63
Joined: Thu Oct 17, 2013 4:25 pm

Post 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.
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post 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.
Locked