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