for scany = 0,20 do
maxscanx=math.sqrt(400-(scany^2))
for scanx = 0,maxscanx do
tpt.set_property("temp",tpt.get_property("temp",x+scanx,y+scany)+500,x+scanx,y+scany)
tpt.set_property("temp",tpt.get_property("temp",x+scanx,y-scany)+500,x+scanx,y-scany)
tpt.set_property("temp",tpt.get_property("temp",x-scanx,y+scany)+500,x-scanx,y+scany)
tpt.set_property("temp",tpt.get_property("temp",x-scanx,y-scany)+500,x-scanx,y-scany)
end
end
for scany = -20,20 do
maxscanx=math.sqrt(400-(scany^2))
for scanx = -maxscanx,maxscanx do
tpt.set_property("temp",tpt.get_property("temp",x+scanx,y+scany)+50,x+scanx,y+scany)
end
end
jacksonmj:
Check whether the particle exists with tpt.get_property("type",...) before trying to access its temperature.
For particles which don't exist, trying to get any property other than type will cause an error and stop the update function from running.