Page 1 of 1

Converting one flowing liquid to other

PostPosted: Sun Feb 12, 2017 20:33
by vladts
Hello!
I have some difficulty with converting one flowing liquid to other. If I simply call add_node() with target flowing liquid and set the same level, as it was for the original liquid, my target liquid disappears, because I have no source of this liquid. I don't see some simple solution of such problem( But maybe it exists?

Re: Converting one flowing liquid to other

PostPosted: Tue Feb 14, 2017 12:22
by Wuzzy
I have not tried it, but if I recall correctly, the liquid level is stored in param2.
You could do something like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.set_node(pos, {name = ITEMSTRING_OF_NEW_LIQUID_NODE, param2 = OLD_LIQUID_NODE.param2})

on the flowing liquid node and see what happens.