Advertisement
YellowAfterlife

Untitled

Oct 21st, 2014
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var tx, ty, ts, ts2;
  2. ts = 16 // tile size, in pixels
  3. ts2 = ts / 2 // half-size
  4. for (tx = 0; tx < room_width; tx += ts)
  5. for (ty = 0; ty < room_height; ty += ts)
  6. {
  7.     // if there isn't anything at this position (checking at tile center):
  8.     // (could also use !place_meeting if all land objects have the same parent)
  9.     if (position_empty(tx + ts2, ty + ts2)) {
  10.         instance_create(tx, ty, obj_sea)
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement