Advertisement
bramvito

Map YAML file

May 7th, 2013
7,703
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.94 KB | None | 0 0
  1. ---
  2. #level/map file
  3. #- cloud-1:
  4. # cloud: 0.7
  5. # position: [0,400]
  6. # scale: [360,360]
  7. # image: ["levels/tileset_sky.png", [48,48], [0,0]]
  8. #
  9. #- cloud-2:
  10. # cloud: 0.7
  11. # position: [1600,400]
  12. # scale: [360,360]
  13. # image: ["levels/tileset_sky.png", [48,48], [1,0]]
  14. #
  15. #- cloud-3:
  16. # cloud: 0.7
  17. # position: [1200,-200]
  18. # scale: [360,360]
  19. # image: ["levels/tileset_sky.png", [48,48], [2,0]]
  20.  
  21. - main-level-object-back:
  22. position: [0,0]
  23. scale: [1920,1920]
  24. image: levels/new_level_back.png
  25. #randomclouds: "levels/tileset_sky.png"
  26.  
  27. - moving-platform:
  28. commands: "
  29. \nif self.position.x > 475 * self.scale_factor:
  30. \n self.variable_1 = 1
  31. \nif self.position.x < 425 * self.scale_factor:
  32. \n self.variable_1 = 0
  33. \nif self.variable_1 == 0:
  34. \n self.velocity.x = 12.5 * self.scale_factor
  35. \nelse:
  36. \n self.velocity.x = -12.5 * self.scale_factor
  37. "
  38. position: [425,840]
  39. offset: [0,0]
  40. scale: [37,8]
  41. image: levels/moving_platform.png
  42. solid: 37
  43.  
  44. - moving-platform_2:
  45. commands: "
  46. \nif self.position.x > 475 * self.scale_factor:
  47. \n self.variable_1 = 1
  48. \nif self.position.x < 425 * self.scale_factor:
  49. \n self.variable_1 = 0
  50. \nif self.variable_1 == 0:
  51. \n self.velocity.x = 12.5 * self.scale_factor
  52. \nelse:
  53. \n self.velocity.x = -12.5 * self.scale_factor
  54. "
  55. position: [475,870]
  56. offset: [0,0]
  57. scale: [37,8]
  58. image: levels/moving_platform.png
  59. solid: 37
  60.  
  61. - door-to-pub:
  62. animation: oncollision
  63. tpf: 5
  64. condition: "if main_game.keyboard.is_clicked(K_DOWN): self.timer = 1"
  65. commands: "
  66. \nself.animation_loop = False
  67. \nif self.animation_done:
  68. \n level = Level('level_pub.map', Vector(159*self.scale_factor,150*self.scale_factor))
  69. \n main_game.list_update = [level]
  70. \n main_game.list_draw = [level]
  71. "
  72. image: ["levels/door to pub animation/door to pub frames", "door_to_pub_frame "]
  73. position: [949,892]
  74. scale: [12,20]
  75.  
  76. - three-tuns-sign:
  77. animation: oncollision
  78. tpf: 5
  79. condition: "if yvel > 125: self.timer = 1"
  80. position: [857,827]
  81. scale: [27,38]
  82. image: ["levels/three tuns animation/three tuns animation frames pixen", "three tuns animation "]
  83.  
  84. - npc_old_man:
  85. interactive: npc
  86. position: [552,888]
  87. scale: [13,24]
  88. image: characters/old_man/old_man.png
  89. dialog: test_dialog.dialog
  90.  
  91. - player:
  92. position: [504,864]
  93.  
  94. - main-level-object-front:
  95. position: [0,0]
  96. scale: [1920,1920]
  97. image: levels/new_level_front.png
  98. tile_scale: [24,24]
  99. tile_solids: "
  100. ................................................................................
  101. ................................................................................
  102. ................................................................................
  103. ................................................................................
  104. ................................................................................
  105. ................................................................................
  106. ................................................................................
  107. ................................................................................
  108. ................................................................................
  109. ................................................................................
  110. ................................................................................
  111. ................................................................................
  112. ................................................................................
  113. ................................................................................
  114. ................................................................................
  115. ................................................................................
  116. ..........................#####.................................................
  117. ...........................###..................................................
  118. ................................................................................
  119. ................................##..............................................
  120. ................................##..............................................
  121. ................................................................................
  122. ................................................................................
  123. ...................................##...........................................
  124. ...................................##...........................................
  125. ................................................................................
  126. ................................................................................
  127. ................................##..............................................
  128. ................................##..............................................
  129. ................................................................................
  130. ................................................................................
  131. .............................##.......................########..................
  132. .............................##......................##########.................
  133. .....................................................#####...###................
  134. .....................................................####.....##................
  135. ...............................^^.....................####......................
  136. ..............................^^..................^^...##########...............
  137. .....................##........^^^...............^^.....#########...............
  138. .....................###^^^^#######.##############.......######.................
  139. ......................##....#######.###############.............................
  140. ......................##..#########..#######.....###............................
  141. ..........................####.#####.####.........#####.........................
  142. ......................^^^^###...####..##...........###..........................
  143. ..........................##.....####.##...........................####.........
  144. ..................................###........#########^^^^...####..####.........
  145. ..................................####.....############......####...##..........
  146. .............................###...####....######...####......##................
  147. ............................#####..#####....####.....####.......................
  148. ............................######..####..............###..#....................
  149. .............................#####...##.....###.......###.......................
  150. .....................######...#####.....##..####.....####.......................
  151. ......................####......##########...############...#...................
  152. .......................##........#########....##########........................
  153. ...................................#######......................................
  154. ....................................#####...#................#..................
  155. ................................................................................
  156. ................................................................................
  157. ...........................................##.##..............#.................
  158. ..........................................###.####..............................
  159. .........................................####.######........................####
  160. ........................................#####.#########....#####...........#####
  161. ......................................#######.###########################.######
  162. ....................................#########.##################################
  163. ..............................###############.##################################
  164. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~###############.##################################
  165. ................................................................................
  166. ................................................................................
  167. ................................................................................
  168. ................................................................................
  169. ................................................................................
  170. ................................................................................
  171. ................................................................................
  172. ................................................................................
  173. ................................................................................
  174. ................................................................................
  175. ................................................................................
  176. ................................................................................
  177. ................................................................................
  178. ................................................................................
  179. ................................................................................
  180. "
  181.  
  182. - wheel:
  183. animation: loop
  184. tpf: 5
  185. position: [1100,840]
  186. scale: [96,96]
  187. image: ["levels/wheel animation/wheel animation frames", "wheel_animation "]
  188. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement