Thread: Box Checks
View Single Post
  #7  
Old 04-11-2010, 11:26 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by fowlplay4 View Post
Then use a for loop?

PHP Code:
for (temp.i = player.x; temp.i < (player.x + 3); temp.i++) {
  for (
temp.j = player.y; temp.j < (player.y + 3); temp.j++) {
    if (
temp.i in |this.x - 6, this.x + 6| && temp.j in |this.y - 6, this.y + 6|) { 
      
// In Box 
    
} 
  }
} 
I was seeing if there was a way to do it without loops.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote