if tpt.get_property("tmp2", i) == 0 then
local a = (math.random(360)-1) * 0.01745329;
tpt.set_property("life",680,i)
tpt.set_property("vx",2*math.cos(a),i)
tpt.set_property("vy",2*math.sin(a),i)
tpt.set_property("tmp2",1,i)
end
I found this in an example amde by jacob1 and I have been using it for all the energy particles I make.
Try using sim.pressure(x/4,y/4,pressure value).