"homing" missiles?

BlitzPlus Forums/BlitzPlus Programming/"homing" missiles?

I've been trying to do this for a while now....Basically, what I need is an algorythm that points an enemy or enemy's missile towards the player each frame. I thought it would be something to do with sin/tan and the player's x and y position, but I can't get my head around it...:S

Can anyone help me with this?

yo dude!

check it out:

http://www.blitzbasic.com/codearcs/codearcs.php?code=1073

Mr Brine

Doesn't work for me. Is it something to do with the scope of variables ox and oy (I only had a very quick glance)?

The upload got corrupted. ox should be o\x.

Thanks floyd! Ive fixed the code so it should work ok now!