Guest User

Untitled

a guest
Sep 9th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // çèìà
  2. ds_grid_set_region(ds_dungeon, 0, 0, room_width / 32, room_height / 32, 0)
  3. biome[2, 1] = irandom(room_width div 32)
  4. biome[2, 2] = irandom(room_height div 32)
  5. biome[2, 3] = irandom_range(3, 16)
  6. biome[2, 4] = irandom_range(3, 16)
  7. ds_grid_set_region(ds_dungeon, biome[2, 1], biome[2, 2], biome[2, 1] + biome[2, 3], biome[2, 2] + biome[2, 4], 1)
  8. for(i = biome[2, 1]; i < biome[2, 1] + biome[2, 3]; i += 1)
  9. {
  10.     for(j = biome[2, 2]; j < biome[2, 2] + biome[2, 4]; j += 1)
  11.     {
  12.         chance[1] = choose(-1, 1)
  13.         chance[2] = irandom(10)
  14.         chance[3] = choose(-1, 1)
  15.         if chance[1]
  16.         {
  17.             if chance[2] == 10
  18.             {
  19.                 if chance[3]
  20.                 {
  21.                     r = irandom(2)
  22.                     ds_grid_set_region(ds_dungeon, i - r, j - r, i + r, j + r, 0)
  23.                 }
  24.             }
  25.         }
  26.     }
  27. }
  28.  
  29. for(i = biome[2, 1]; i < biome[2, 1] + biome[2, 3]; i += 1)
  30. {
  31.     for(j = biome[2, 2]; j < biome[2, 2] + biome[2, 4]; j += 1)
  32.     {
  33.         if ds_grid_get(ds_dungeon, i, j)
  34.         {
  35.             o = instance_create(i, j, block)
  36.             o.type = 2
  37.         }
  38.     }
  39. }
Add Comment
Please, Sign In to add comment