In trying to make water more realistic, I tried to set high and low pressure transitions.
Code:
elements.property(elements.DEFAULT_PT_WATR,LowPressure,-2)
elements.property(elements.DEFAULT_PT_WATR,LowPressureTransition,WTRV)
elements.property(elements.DEFAULT_PT_WATR,HighPressure,150)
elements.property(elements.DEFAULT_PT_WATR,HighPressureTransition,ICE)
However, I get this:
test.lua:1: bad argument #2 to 'property' (string expected, got nil)
oh, that worked. for some reason the script doesn't evaporate water till someone presses the frame button. or freeze water, either.
hmm. still not working.
You forgot quotes in the variables LowPressure, LowPressureTransition, HighPressure and HighPressureTransition. ICE and WTRV should be elements.DEFAULT_PT_ICE and elements.DEFAULT_PT_WTRV , respectively. Also you forgot place an space between "LowPressure", and -2.
I made the changes that @jacob2 suggested. It works fine to me.
elements.property(elements.DEFAULT_PT_WATR,"LowPressure",-2)
elements.property(elements.DEFAULT_PT_WATR,"LowPressureTransition",elem.DEFAULT_PT_WTRV)
elements.property(elements.DEFAULT_PT_WATR,"HighPressure",150)
elements.property(elements.DEFAULT_PT_WATR,"HighPressureTransition",elem.DEFAULT_PT_ICE)
This may write in console?
guys?..