d = vec_dist (my.x,you.x); my.health -= (500 - clamp(d,0,500))/500 * some_factor_to_control_the_strength;
Gamestudio download | Zorro platform | shop | Data Protection Policy
oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de