graphics(i, colr, colg, colb) if tpt.get_property("temp",i) > sometemp return 0, values... elseif tpt.get_property("temp",i) < someothertemp return 0, values... end end
Use this as a template, and change it to do what you want. Graphics functions pass in the i variable so you can get properties of the element, and returning 0 won't cache your return values, allowing the graphics to change (and also be a little laggy)