View Single Post
  #3  
Old 03-26-2011, 05:41 PM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
Yea that's what I'm doing just was hoping there was a more efficient way. Do you know a better way than this

PHP Code:
function onBlock( temp.sX, temp.sY, temp.eW, temp.eH)
{

  
temp.block = false;

  for ( 
temp.a = 0; temp.a < temp.eW; temp.a ++;)
  {
  
    if ( 
temp.block)
      break;
  
    for ( 
temp.b = 0; temp.b < temp.eH; temp.b ++;)
    {

      
temp.test = player.gmap.tilelayers[ 1].tiles[ temp.sX + temp.a, temp.sY + temp.b];
  
      if ( 
temp.test in this.blockTiles)
      {
      
        
temp.block = true;
        break;
        
      }   
    }
  }
   
  return 
temp.block;

} 
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!

Last edited by MrOmega; 03-26-2011 at 06:03 PM..
Reply With Quote