Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tpt.el.dmnd.name="OBSI"
- tpt.el.dmnd.description="Obsidian! (renamed dmnd)"
- tpt.el.dmnd.color=0X111124
- tpt.el.dmnd.hconduct = 0
- local LAVA = tpt.element("LAVA")
- local OBSI = tpt.element("OBSI")
- function waterhook(i,x,y,s,n)
- --pick one random coord per frame to check, use the for loops for all
- local checkx = x+math.random(-1,1)
- local checky = y+math.random(-1,1)
- --for checkx = x-1,x+1 do
- --for checky = y-1,y+1 do
- local aroundtype = tpt.get_property("type",checkx,checky)
- if aroundtype>0 and aroundtype==LAVA then
- --local otherid = tpt.get_property("id",checkx,checky) --if you want to set some properties of the other element, not needed just for kill
- tpt.set_property("type",OBSI,i) --change self into something else, tpt.parts[i] is much much laggier than tpt.set_property()
- tpt.delete(checkx,checky) --delete lava particle (the water eats it)
- return true --means it died (skips movement later) more realistic
- end
- -- end
- --end
- end
- tpt.element_func(waterhook,tpt.el.watr.id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement