Guest User

Untitled

a guest
Sep 7th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var chance, _x, _y;
  2.  
  3. for(i = -64; i < room_width + 64; i += 32)
  4. {
  5.     for(j = room_height; j > -64; j -= 32)
  6.     {
  7.         o = instance_create(i, j, block)
  8.         o.type = 1
  9.         chance[1] = choose(-1, 1)
  10.         chance[2] = irandom(10)
  11.         if chance[1]
  12.         {
  13.             if chance[2] == 10
  14.             {
  15.                 instance_create(i, j, destroyer)  
  16.             }
  17.         }
  18.     }
  19. }
  20.  
  21. while 1
  22. {
  23.     _x = random(room_width)
  24.     _y = random(room_height)
  25.     if !collision_rectangle(_x - 32, _y - 32, _x + 32, _y, solid, 1, 0)
  26.     {
  27.         instance_create(_x, _y, player)
  28.         break
  29.     }
  30. }
Add Comment
Please, Sign In to add comment