Thread: Box Checks
View Single Post
  #5  
Old 04-11-2010, 11:09 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
You want to do this..?

PHP Code:
if (player.x in |this.x - 6, this.x + 6| && player.y in |this.y - 6, this.y + 6|) {
  
// In Box
} 
Use that and you could..

1. Check the center
2. Check the corners
Can't really because it's a largish area.

More along the lines of this (though not possible)
PHP Code:
if (|player.x, player.x+3| in |this.x, this.x+this.movementx| && |player.y, player.y+3| in |this.y, this.y+this.movementy|) {
  
//overlapping points
} 
__________________
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