Thread: Math Help
View Single Post
  #13  
Old 01-29-2007, 10:08 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Chandler View Post
HTML Code:
  if (mousescreenx in |player.x - 5, player.x + 5| && mousescreeny in |player.y - 5, player.y + 5|)
  {
    //Do Direction...and drop effect
  }
mousescreen- and player.- position are using a different kind of coordinates.

It should be mousex-player.x in |-5,5| blah blah blah

Even better is
PHP Code:
if (((mousex-player.x)^2+(mousey-player.y)^2)^.5 5) {
  
// do stuffs

__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote