here is a very simple script from the forum (cant remember who posted this)
function growth(i,x,y,s,n)
type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
if type==tpt.el.watr.id then
tpt.parts[i].type=tpt.el.plnt.id
end
end
tpt.element_func(growth,tpt.el.wood.id)
Will it for example be able to be used in lava and weater turns to obsidian? Because I'm not fully understanding the piece you just posted.
EDIT:
For example: Iron comes in contact with 400* salt and turns to Iron, but with more heat resistance.
if i understood you right, yes. try this in your autorun.lua
function growth(i,x,y,s,n)
type=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
if type==tpt.el.watr.id then
tpt.parts[i].type=tpt.el.glas.id
end
end
tpt.element_func(growth,tpt.el.lava.id)
EDIT: okay i've tried the script but there is no visible effect because lava is changing to stne anyway if cooled down.. changed STNE to GLAS, now it has a visible effect
Here is something a little more clear and functional. You should be able to figure out how to modify it to how you want it.