Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function key(a,b,c,d)
- if (c==1) and (a=='2') and (d==1) then
- if tmpdisplay==1 then
- tpt.log("Tmp gradient display off")
- tmpdisplay=0
- else
- tpt.log("Tmp gradient display on")
- tmpdisplay=1
- end
- end
- end
- tpt.register_keypress(key)
- function TmpDisplay()
- if tmpdisplay==1 then
- while tpt.next_getPartIndex() do
- local index = tpt.getPartIndex()
- local life = tpt.get_property("tmp", index)
- local col = math.ceil(math.sin(0.4*life)*100+128)
- tpt.drawpixel(tpt.get_property("x", index),tpt.get_property("y", index), col, col, col, 255)
- end
- end
- end
- tpt.register_step(TmpDisplay)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement