Hello. I'm doing an element in lua and it seems that i can't make it destroy when
temperature is over 400 °C
Here's what i use for now:
function nthink(i,x,y,s,n)
if tpt.get_property("ctype",i)==tpt.el.tron.id then
if tpt.get_property("temp",i)>=(400+273.15) then
tpt.delete(x,y)
--tpt.create(x,y,"bmtl")
end
end
end
tpt.element_func(nthink,tpt.el.bran.id)
Also, is there a way to create pressure on X and Y?
Simon:
tpt.delete has 2 modes of operation, tpt.delete(xCoord, yCoord) or tpt.delete(index), the latter is both faster and more reliable, you should use that instead.
For pressure, see https://powdertoy.co.uk/Wiki/W/Lua.html#tpt.set_pressure
Yeah, i've got the nthink working, but i still don't understand pressure. It seems i can't really
set pressure to 10 on X and Y. Is there a way to get pressure of an material?
Post:
Ah, cool. I got it working correctly, but there's only one feature missing. You say it's not possible to get pressure so it seems i can't make it. xD
can't you just go tpt.el.(element abbriviation here).airflow/airloss=(number)?
otherwise what is the point of that?