# URGENT! PLEASE RESPOND! -- simple actionscripting problems

**URL:** https://forum.kirupa.com/t/urgent-please-respond-simple-actionscripting-problems/78510
**Category:** Uncategorized
**Created:** [February 5, 2005, 7:49am UTC](https://forum.kirupa.com/t/urgent-please-respond-simple-actionscripting-problems/78510 "2005-02-05T07:49:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![4441524259](https://avatars.discourse-cdn.com/v4/letter/4/ecd19e/32.png) [@4441524259](https://forum.kirupa.com/u/4441524259)
#### Post date: [February 5, 2005, 7:49am UTC](https://forum.kirupa.com/t/urgent-please-respond-simple-actionscripting-problems/78510/1 "2005-02-05T07:49:11Z")

</div>

I really need some help on this, PLEASE HELP!!

// though it may look like i’ve made a sorry version of actionscript  
// i have not. it’s just simple and brief description of what i’m trying  
// to accomplish in this project.

Sprite.1 : your character, blue circle; movement = “up”,“down”,“left”,“right” arrow keys. \<FINISHED\>

Sprite.2 : enemy character, red square; movement = diagonals only; always toward Sprite.1.

END : Sprite.2 completely covers Sprite.1

Score : # of moves \* 100

Mode change 1: @ score 6000 = PARANOIA MODE; score +2500pts; score = # of moves \* 250. Background\_color = Sprite.2\_color.

Mode change 2: @ score 50000 = FREAK MODE; score +5000pts; score = # of moves \* 500. Background\_color changes between Sprite.1\_color and Sprite.2\_color every 3-15 frames.

* * *

basically what I need the most now, is to figure out how i get Sprite.2 to come towards Sprite.1 in a diagonal manner. this is what i have now:[indent]onClipEvent(keyDown){

if (Key.isDown(Key.UP)){  
\_x += 25;  
\_y -= 25;  
}else if (Key.isDown(Key.DOWN)){  
\_x -= 25;  
\_y += 25;  
}else if (Key.isDown(Key.LEFT)){  
\_x -= 25;  
\_y -= 25;  
}else if (Key.isDown(Key.RIGHT)){  
\_x += 25;  
\_y += 25;  
}  
}

[/indent]its just that i want Sprite.2 to move toward Sprite.1 (like he’s chasing after him) just all this does it make it so they both follow the same direction. How can I do this?
