View Single Post
  #3  
Old 07-13-2009, 02:51 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Crow View Post
Personally, I would just loop through all the players in the level, and if the player's x and y are inside the sparring part of the level, you increment a variable. If the value of the variable reaches two, break out of the loop (since it's not needed anymore). Then you know that there's two people inside.

This.


Also, to check if the player is in a certain part of the level in the loop, you would use:

PHP Code:
if (player.x in |minXmaxX| && player.y in |minYmaxY|) {
 
//Stuff

Reply With Quote