I am currently trying to recode an old script I made a while back and I am currently stuck tyring to use sim.partProperty to get the current temp of a particle to uses it in a comparison.
is an example of what I am using yet when I go to run the script I keep getting "attempt to compare nil with number" when I go to draw the particles. It always happens at first but eventually goes away. If you can help please do and if you need more of the script to attempt to help just ask. Thats just the line the error is on
I suggest still using tpt.get_property because it's smaller to write and people understand it, and it's documented in the wiki how to use it, I would go look under the legacy lua api section. I'm not actually sure how to use partProperty but I think it involves weird things like sim.FIELD_TEMP
If you want to get the temp of particle id i, do tpt.get_property("temp", i) If you want to get the temp of particle at location x,y, do tpt.get_property("temp", x, y)