View Single Post
  #11  
Old 08-24-2002, 12:02 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
He he. I always do something like this:
NPC Code:

for (i=0;i<playerscount;i++)
{ if (abs(mousex-players[i].x-1.25)=<1 && abs(mousey-players[i].y-.5)=<1)
{ actions;}
}


that way it checks to see where the mouse is at, and you can customize the distance you want it for. Of course you would have to do an if (created) timeout=0.5; (I would use 0.5 in this case b/c it is still faster than the player notices, but isn't as laggy as 0.1!) and then put that 'for' in the timeout and have it loop.
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice

Last edited by emortylone; 08-24-2002 at 10:30 PM..
Reply With Quote