At 2/2/08 03:15 PM, Hoeloe wrote:
if(this.hitTest(_root.player)){
_root.player.gotoAndStop("explodeanim");
}
then put this on the last frame of the explosion animation:
_root.gotoAndStop("gameover");
Ty it helped alot :) thanks guys
another thing is that i got this script set for my enemy to follow but sometimes it doesn't follow exactly an kinda moves away X.x
onClipEvent (enterFrame) { if (_root.player._x > _x) { _x += 5; }}onClipEvent (enterFrame) { if (_root.player._x<_x) { _x -= 5; }}onClipEvent (enterFrame) { if (_root.player._y>_y) { _y += 5; }}onClipEvent (enterFrame) { if (_root.player._y<_y) { _y -= 5; }}
also this script lets me move the player but its choppy an its not smooth when it moves around:
onClipEvent (enterFrame) { if (Key.isDown(Key.UP)) { _y -= 10; _rotation = 270; }}onClipEvent (enterFrame) { if (Key.isDown(Key.DOWN)) { _y -= -10; _rotation = 90; }}onClipEvent (enterFrame) { if (Key.isDown(Key.LEFT)) { _x -= 10; _rotation = 180; }}onClipEvent (enterFrame) { if (Key.isDown(Key.RIGHT)) { _x -= -10; _rotation = 0; }}
SO if u guys can help thanks again...