while(c && m && bounds_dist(c,m)>c.step_size)
So.. I tried writing my own walk_to() proc using bounds_dist to get pixel perfect accuracy yet I came up with a problem. I walk towards an enemy then attack, then back to my initial position. Then it's the enemies turn and they begin walking towards me and the code gets stuck here, constantly sending the world my debugging message. My assumption is that my formula for while() is off and when the enemy or I get to a certain bounds_dist it either keeps on running the above code, or it skips it completely.
I've tried all sorts of formulas, some work longer than others but in the end, always reach a breaking point. I'm not an expert with math, anyone think they know a formula that'll work this correctly?