Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // generate an array with 1's and 0's
  2.  
  3. tileSize = 8
  4.  
  5. w = room_width
  6. h = room_height
  7.  
  8. colMap[w/tileSize , h/tileSize ] = 0
  9.  
  10. for( xx=0 ; xx < w ; xx += tileSize ) {
  11.     for( yy=0 ; yy < h ; yy += tileSize) {
  12.         if tile_layer_find( 100 , xx , yy ) {
  13.             colMap[ xx/tileSize , yy/tileSize ] = 1
  14.             else colMap[ xx/tileSize , yy/tileSize ] = 0
  15. //            show_debug_message("tilefind!")
  16.             }
  17.        
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement