ok...say I have dot1(enemy) and I want it to approach the position of dot2(shield)....how do I do that? I can make dot1(enemy) move to the starting location of dot2(shield)...but if dot 2(shield) moves dot1(enemy) does not travel to the new position... how do I retrieve the new location? this is what I have been using: ( it is inside of of the dot1(enemy) movie clip):
onClipEvent(enterFrame){
eSpeed = 2;
if(this._x > _root.shield._x){
_x -= eSpeed;
}
if(this._x < _root.shield._x){
_x += eSpeed;
}
if(this._y > _root.shield._y){
_y -= eSpeed;
}
if(this._y < _root.shield._y){
_y += eSpeed;
}
}
2006-06-30
08:16:46
·
1 answers
·
asked by
strangenate@sbcglobal.net
1
in
Computers & Internet
➔ Programming & Design