Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. ///Declaring variables and drawing image
  2. gamegridx = 4
  3. gamegridy = 3
  4. tile_size = 128
  5. row = 0
  6. col = 0
  7. tile_width = background_get_width(bg_image)
  8. tile_height = background_get_height(bg_image)
  9. image = bg_image
  10.  
  11.  
  12. gridx = tile_width / tile_size
  13. gridy = tile_height / tile_size
  14.  
  15. repeat(gamegridx)
  16. {
  17. repeat(gamegridy)
  18. {
  19. instance_create(col*tile_size, row*tile_size, obj_gridsquare)
  20. row++
  21. }
  22. row = 0
  23. col++
  24. }
  25.  
  26. var inst;
  27. inst = instance_nearest(0,0,obj_gridsquare);
  28.  
  29. with(obj_gridsquare)
  30. {
  31. if inst = id
  32. {
  33. instance_destroy()
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement