Thread: shoot
View Single Post
  #7  
Old 12-23-2008, 09:57 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by [email protected] View Post
since this thread it open. Lets just say i am useing the function shoot() i have the angle at 0.9 im trying to find the distance from the player to my mouse. somthing like an arrow script, any ideas. If im not explaining this right please tell me.
You would need to use the distance formula

PHP Code:
distance = ((endx startx) ^ + (endy starty) ^ 2) ^ .5
... I think I got that right
__________________
Reply With Quote