|
Okay, here's the deal: dradstr is the player character lobulletright and lobulletleft are the projectiles The code is:
| CODE | { if dradstr.y > self.y - 5 and dradstr.y < self.y + 5 { if dradstr.x > self.x instance_create(self.x,self.y,lobulletright) if dradstr.x < self.x instance_create(self.x,self.y,lobulletleft) } } |
Now this is fine, but it would be nicer if the enemy only fired when you were at most 150 pixels away. Is there a way I can make the game find the distance between these two objects?
This post has been edited by Tek-Tek on Apr 20 2007, 01:08 PM
--------------------
|