Now, you want this to move towards the direction, not just appear on the direction.
So, what you do is move it 4 pixels towards the direction at a time, and remove 4 from the counter. This moves it quite fast in that direction, it reaches the destination in 8 frames. It can be modified to move faster or slower, by making it move:
1 pixel per frame (very slow - takes 32 frames),
2 pixels per frame (quite slow - takes 16 frames),
8 pixels per frame (very fast - takes 4 frames),
or 16 pixels a frame (almost instant - takes 2 frames).
If you do change it though, you will have to remove the same amount from the counter as the number of pixels you move the player.
Here's the code...
Moving right:
-Horizontal counter > 0
...Set position to X=X(current object) + 4 (player & all detectors)
...Subtract 4 from (Horizontal counter)
Moving left:
-(Horizontal counter) < 0
...Set position to X=X(current object) - 4 (player & all detectors)
...Add 4 to (Horizontal counter)
Moving up:
(Vertical counter) < 0
...Set position to Y=Y(current object) - 4 (player & all detectors)
...Add 4 from (Horizontal counter)
Moving down:
-(Vertical counter) > 0
...Set position to Y=Y(current object) + 4 (player & all detectors)
...Subtract 4 from (Horizontal counter)
Well, I think that's pretty much it, it's a bit simple now, but you can add more features later, maybe.
Here's an example file showing you how it's done (if you're really that lazy... Which I assume you are...).
In the example you can press tab to show/hide the detectors.
TTFN - This means Ta Ta For Now, for those of you who are, let's say... Ignorant.
PHIZZY
[Insert Evil Laugh Here]
Return to Phizzy Games - Home.