I am making a potions script that will add potions that modify stickman and fighters. The script revolves around detecting when a stickman is submerged in a particular liquid. In simpler terms that means using a function to tell when a stickman is within 1 - 3 pixels of my new element. Is there a way to find out all nearby particles within a specific range?
for i in sim.partNeighbors(<stuff>) do
print(i)
end
I don't understand how to use the function. Am I supposed to put the sim.partNeighbors(100, 100, 3, tpt.el.stkm.id) part in a update function that runs when the particle updates?
The code below should turn all DUST that goes within 3 pixels of it into WATR.
Current Code: