I need this for an explosion. Once the explosion is spawned, I should do some operation (like change the HP) on all objects within 100 pixels of it.
for each objectThatyouwantTopick
-distance(pointofexplosion.x,pointofexplosion.y, objectThatyouwantTopick.x, objectThatyouwantTopick.y) < radius, do stuff
Develop games in your browser. Powerful, performant & highly capable.
You could use the distance() expression to affect how much hp is damaged too.
jus' sayin :)