How can I used the distance variable to keep enemies from running into certain environmental assets? I can't seem to get it to work!
Thanks guys!
Develop games in your browser. Powerful, performant & highly capable.
Not sure how your looking to apply it, but distance works like:
distance(a.X,a.Y,b.X,b.Y)
this gives the ditstance between a and b
Applying it could be something like
Compare variables
distance(a.X,a.Y,b.X,b.Y) < 100
action: stop moving
That's actually perfect, and seems to be working great now! Thanks alot!