Thread: Player on Npc
View Single Post
  #3  
Old 03-02-2011, 10:41 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Slight side note but you can specify ranges rather than using multiple && e.g.

PHP Code:
  if (player.x in |this.xthis.x+5| && player.y in |this.y-5this.y|)
    
this.chat "FOUND YOU!"
I'd nest the y test but going off your example. Can still look neat(ish) without having to declare temp vars
Reply With Quote