I’m trying to make an object follow another one when it hits it. (The moving object is called “hook”)
The Hook has an animation that allows it to move towards the other object.
I tried this in the object’s actions:
onClipEvent(enterFrame){
if(_root.hook.hitTest(this)){
this._x=_root.hook._x
this._y=_root.hook._y
}
}
The problem here is that the object only goes to the initial location of the hook, and doesn’t change it’s position depending on the hook’s location. How do I fix this?