Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var chance, _x, _y;
- for(i = -64; i < room_width + 64; i += 32)
- {
- for(j = room_height; j > -64; j -= 32)
- {
- o = instance_create(i, j, block)
- o.type = 1
- chance[1] = choose(-1, 1)
- chance[2] = irandom(10)
- if chance[1]
- {
- if chance[2] == 10
- {
- instance_create(i, j, destroyer)
- }
- }
- }
- }
- while 1
- {
- _x = random(room_width)
- _y = random(room_height)
- if !collision_rectangle(_x - 32, _y - 32, _x + 32, _y, solid, 1, 0)
- {
- instance_create(_x, _y, player)
- break
- }
- }
Add Comment
Please, Sign In to add comment