Hello whinter,
You can take a look at this forum thread:
www.gamemaker3d.com/forum/general-discus...-make-a-nextbot#3373
There’s an example over there for a zombie that chases you if you get close enough.
You can replace the zombie with a cube, for example.
You can view the source code and see how it was done.
Feel free to ask us about the example.
Cyberix3D team