Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.95 KB | None | 0 0
  1. var stg_width, stg_height, top_x, top_y, scale_x, scale_y;
  2. stg_width = 902;
  3. stg_height = 513;
  4. scale_x = .725;
  5. scale_y = .725;
  6. top_x = stg_width * 0.5 - 402 * scale_x;
  7. top_y = ceil ( stg_height - 388 * scale_y );
  8.  
  9. // Set the camera boundaries + maximal zoom level. Minimal zoom level is determined by camera boundaries.
  10.  
  11. camera_boundary_l = 0;
  12. camera_boundary_u = 0;
  13. camera_boundary_r = stg_width;
  14. camera_boundary_d = stg_height;
  15. camera_boundary_zoom = 155;
  16.  
  17. // Set the death boundaries.
  18.  
  19. death_l = -96;
  20. death_u = -66;
  21. death_r = stg_width + 96;
  22. death_d = stg_height + 72;
  23.  
  24. // Set the players' starting position and respawn point.
  25.  
  26. player_spawn_x [ 0 ] = top_x + 48 * scale_x;
  27. player_spawn_y [ 0 ] = top_y + 122 * scale_y + 1;
  28. player_spawn_x [ 1 ] = top_x + 756 * scale_x;
  29. player_spawn_y [ 1 ] = player_spawn_y [ 0 ];
  30. player_spawn_x [ 2 ] = top_x + 189.6 * scale_x;
  31. player_spawn_y [ 2 ] = player_spawn_y [ 0 ];
  32. player_spawn_x [ 3 ] = top_x + 614.4 * scale_x;
  33. player_spawn_y [ 3 ] = player_spawn_y [ 0 ];
  34. player_spawn_x [ 4 ] = top_x + 331.2 * scale_x;
  35. player_spawn_y [ 4 ] = player_spawn_y [ 0 ];
  36. player_spawn_x [ 5 ] = top_x + 472.8 * scale_x;
  37. player_spawn_y [ 5 ] = player_spawn_y [ 0 ];
  38. respawn_x = stg_width * 0.5;
  39. respawn_y = player_spawn_y [ 0 ] - 150;
  40.  
  41. // Load and set the stage collisions.
  42.  
  43. stage_install_bg_object();
  44. obj_stage_bg.top_x = top_x;
  45. obj_stage_bg.top_y = top_y;
  46. obj_stage_bg.scale_x = scale_x;
  47. obj_stage_bg.scale_y = scale_y;
  48. obj_stage_bg.stg_width = stg_width;
  49. obj_stage_bg.stg_height = stg_height;
  50.  
  51. global.msk_stg[0] = stage_msk_add ( 'stage/district/mask_floor.png' , 1 , 1 , 0 , 0 , 0 );
  52. global.msk_stg[1] = stage_msk_add ( 'stage/district/mask_lwall.png' , 1 , 1 , 0 , 0 , 0 );
  53. global.msk_stg[2] = stage_msk_add ( 'stage/district/mask_rwall.png' , 1 , 1 , 0 , 0 , 0 );
  54. global.msk_stg[3] = stage_msk_add ( 'stage/district/mask_ceil.png' , 1 , 1 , 0 , 0 , 0 );
  55. global.msk_stg[5] = spr_add_alpha ( 'stage/district/platform.png' , 1 , 1 , 0 , 123 , 16 );
  56.  
  57. // asda
  58. obj_stage_bg.apollo_bashful = spr_add_alpha ( "stage/district/apollo_bashful.png" , 13 , 0 , 0 , 12 , 30 );
  59. obj_stage_bg.apollo_bashfultalk = spr_add_alpha ( "stage/district/apollo_bashfultalk.png" , 4 , 0 , 0 , 12 , 30 );
  60. obj_stage_bg.apollo_confident = spr_add_alpha ( "stage/district/apollo_confident.png" , 15 , 0 , 0 , 11 , 33 );
  61. obj_stage_bg.apollo_confidenttalk = spr_add_alpha ( "stage/district/apollo_confidenttalk.png" , 12 , 0 , 0 , 11 , 33 );
  62. obj_stage_bg.apollo_deskslam = spr_add_alpha ( "stage/district/apollo_deskslam.png" , 7 , 0 , 0 , 9 , 31 );
  63. obj_stage_bg.apollo_deskslamidle = spr_add_alpha ( "stage/district/apollo_deskslamidle.png" , 4 , 0 , 0 , 9 , 30 );
  64. obj_stage_bg.apollo_deskslamtalk = spr_add_alpha ( "stage/district/apollo_deskslamtalk.png" , 3 , 0 , 0 , 9 , 30 );
  65. obj_stage_bg.apollo_evidence = spr_add_alpha ( "stage/district/apollo_evidence.png" , 1 , 0 , 0 , 11 , 32 );
  66. obj_stage_bg.apollo_evidencetalk = spr_add_alpha ( "stage/district/apollo_evidencetalk.png" , 4 , 0 , 0 , 11 , 32 );
  67. obj_stage_bg.apollo_idle = spr_add_alpha ( "stage/district/apollo_idle.png" , 15 , 0 , 0 , 13 , 32 );
  68. obj_stage_bg.apollo_idletalk = spr_add_alpha ( "stage/district/apollo_idletalk.png" , 12 , 0 , 0 , 13 , 32 );
  69. obj_stage_bg.apollo_nod = spr_add_alpha ( "stage/district/apollo_nod.png" , 4 , 0 , 0 , 13 , 32 );
  70. obj_stage_bg.apollo_objection = spr_add_alpha ( "stage/district/apollo_objection.png" , 11 , 0 , 0 , 12 , 32 );
  71. obj_stage_bg.apollo_objectionidle = spr_add_alpha ( "stage/district/apollo_objectionidle.png" , 4 , 0 , 0 , 9 , 32 );
  72. obj_stage_bg.apollo_objectiontalk = spr_add_alpha ( "stage/district/apollo_objectiontalk.png" , 4 , 0 , 0 , 9 , 32 );
  73. obj_stage_bg.apollo_shakehead = spr_add_alpha ( "stage/district/apollo_shakehead.png" , 11 , 0 , 0 , 13 , 32 );
  74. obj_stage_bg.apollo_shock = spr_add_alpha ( "stage/district/apollo_shock.png" , 9 , 0 , 0 , 16 , 34 );
  75. obj_stage_bg.apollo_sweat = spr_add_alpha ( "stage/district/apollo_sweat.png" , 15 , 0 , 0 , 5 , 28 );
  76. obj_stage_bg.apollo_sweattalk = spr_add_alpha ( "stage/district/apollo_sweattalk.png" , 12 , 0 , 0 , 5 , 28 );
  77. obj_stage_bg.apollo_think = spr_add_alpha ( "stage/district/apollo_think.png" , 4 , 0 , 0 , 9 , 31 );
  78. obj_stage_bg.apollo_thinktalk = spr_add_alpha ( "stage/district/apollo_thinktalk.png" , 4 , 0 , 0 , 9 , 31 );
  79.  
  80. obj_stage_bg.edgeworth_armfold = spr_add_alpha ( "stage/district/edgeworth_armfold.png" , 18 , 0 , 0 , 11 , 29 );
  81. obj_stage_bg.edgeworth_armfoldtalk = spr_add_alpha ( "stage/district/edgeworth_armfoldtalk.png" , 12 , 0 , 0 , 11 , 29 );
  82. obj_stage_bg.edgeworth_bow = spr_add_alpha ( "stage/district/edgeworth_bow.png" , 3 , 0 , 0 , 10 , 34 );
  83. obj_stage_bg.edgeworth_deskslam = spr_add_alpha ( "stage/district/edgeworth_deskslam.png" , 5 , 0 , 0 , 13 , 31 );
  84. obj_stage_bg.edgeworth_deskslamidle = spr_add_alpha ( "stage/district/edgeworth_deskslamidle.png" , 13 , 0 , 0 , 13 , 31 );
  85. obj_stage_bg.edgeworth_deskslamtalk = spr_add_alpha ( "stage/district/edgeworth_deskslamtalk.png" , 12 , 0 , 0 , 13 , 31 );
  86. obj_stage_bg.edgeworth_evidence = spr_add_alpha ( "stage/district/edgeworth_evidence.png" , 1 , 0 , 0 , 10 , 30 );
  87. obj_stage_bg.edgeworth_evidencetalk = spr_add_alpha ( "stage/district/edgeworth_evidencetalk.png" , 12 , 0 , 0 , 10 , 30 );
  88. obj_stage_bg.edgeworth_idle = spr_add_alpha ( "stage/district/edgeworth_idle.png" , 15 , 0 , 0 , 10 , 30 );
  89. obj_stage_bg.edgeworth_idletalk = spr_add_alpha ( "stage/district/edgeworth_idletalk.png" , 12 , 0 , 0 , 10 , 30 );
  90. obj_stage_bg.edgeworth_objection = spr_add_alpha ( "stage/district/edgeworth_objection.png" , 15 , 0 , 0 , 13 , 28 );
  91. obj_stage_bg.edgeworth_objectionidle = spr_add_alpha ( "stage/district/edgeworth_objectionidle.png" , 4 , 0 , 0 , 13 , 28 );
  92. obj_stage_bg.edgeworth_objectiontalk = spr_add_alpha ( "stage/district/edgeworth_objectiontalk.png" , 4 , 0 , 0 , 13 , 28 );
  93. obj_stage_bg.edgeworth_pointing = spr_add_alpha ( "stage/district/edgeworth_pointing.png" , 1 , 0 , 0 , 7 , 29 );
  94. obj_stage_bg.edgeworth_pointingtalk = spr_add_alpha ( "stage/district/edgeworth_pointingtalk.png" , 4 , 0 , 0 , 7 , 29 );
  95. obj_stage_bg.edgeworth_shocked = spr_add_alpha ( "stage/district/edgeworth_shocked.png" , 3 , 0 , 0 , 14 , 30 );
  96. obj_stage_bg.edgeworth_shockedidle = spr_add_alpha ( "stage/district/edgeworth_shockedidle.png" , 4 , 0 , 0 , 10 , 22 );
  97. obj_stage_bg.edgeworth_shockedtalk = spr_add_alpha ( "stage/district/edgeworth_shockedtalk.png" , 4 , 0 , 0 , 10 , 22 );
  98. obj_stage_bg.edgeworth_shrug = spr_add_alpha ( "stage/district/edgeworth_shrug.png" , 16 , 0 , 0 , 17 , 29 );
  99. obj_stage_bg.edgeworth_shrugidle = spr_add_alpha ( "stage/district/edgeworth_shrugidle.png" , 13 , 0 , 0 , 17 , 29 );
  100. obj_stage_bg.edgeworth_shrugtalk = spr_add_alpha ( "stage/district/edgeworth_shrugtalk.png" , 12 , 0 , 0 , 17 , 29 );
  101. obj_stage_bg.edgeworth_smirk = spr_add_alpha ( "stage/district/edgeworth_smirk.png" , 8 , 0 , 0 , 10 , 29 );
  102.  
  103. obj_stage_bg.gumshoebottom = spr_add_alpha ( "stage/district/gumshoebottom.png" , 1 , 0 , 0 , 0 , 0 );
  104. obj_stage_bg.gumshoe_angry = spr_add_alpha ( "stage/district/gumshoe_angry.png" , 15 , 0 , 0 , 17 , 30 );
  105. obj_stage_bg.gumshoe_angrytalk = spr_add_alpha ( "stage/district/gumshoe_angrytalk.png" , 12 , 0 , 0 , 17 , 30 );
  106. obj_stage_bg.gumshoe_confident = spr_add_alpha ( "stage/district/gumshoe_confident.png" , 15 , 0 , 0 , 17 , 34 );
  107. obj_stage_bg.gumshoe_confidenttalk = spr_add_alpha ( "stage/district/gumshoe_confidenttalk.png" , 12 , 0 , 0 , 17 , 34 );
  108. obj_stage_bg.gumshoe_headscratch = spr_add_alpha ( "stage/district/gumshoe_headscratch.png" , 12 , 0 , 0 , 22 , 32 );
  109. obj_stage_bg.gumshoe_idle = spr_add_alpha ( "stage/district/gumshoe_idle.png" , 14 , 0 , 0 , 17 , 32 );
  110. obj_stage_bg.gumshoe_idletalk = spr_add_alpha ( "stage/district/gumshoe_idletalk.png" , 12 , 0 , 0 , 17 , 32 );
  111. obj_stage_bg.gumshoe_lol = spr_add_alpha ( "stage/district/gumshoe_lol.png" , 16 , 0 , 0 , 17 , 32 );
  112. obj_stage_bg.gumshoe_loltalk = spr_add_alpha ( "stage/district/gumshoe_loltalk.png" , 12 , 0 , 0 , 17 , 32 );
  113. obj_stage_bg.gumshoe_pumped = spr_add_alpha ( "stage/district/gumshoe_pumped.png" , 2 , 0 , 0 , 18 , 32 );
  114. obj_stage_bg.gumshoe_pumpedtalk = spr_add_alpha ( "stage/district/gumshoe_pumpedtalk.png" , 12 , 0 , 0 , 18 , 32 );
  115. obj_stage_bg.gumshoe_sad = spr_add_alpha ( "stage/district/gumshoe_sad.png" , 15 , 0 , 0 , 17 , 30 );
  116. obj_stage_bg.gumshoe_sadtalk = spr_add_alpha ( "stage/district/gumshoe_sadtalk.png" , 12 , 0 , 0 , 17 , 30 );
  117. obj_stage_bg.gumshoe_side = spr_add_alpha ( "stage/district/gumshoe_side.png" , 15 , 0 , 0 , 17 , 32 );
  118. obj_stage_bg.gumshoe_sidetalk = spr_add_alpha ( "stage/district/gumshoe_sidetalk.png" , 12 , 0 , 0 , 17 , 32 );
  119. obj_stage_bg.gumshoe_thinking = spr_add_alpha ( "stage/district/gumshoe_thinking.png" , 12 , 0 , 0 , 17 , 32 );
  120. obj_stage_bg.gumshoe_thinkingtalk = spr_add_alpha ( "stage/district/gumshoe_thinkingtalk.png" , 12 , 0 , 0 , 17 , 32 );
  121.  
  122. obj_stage_bg.judge_angry = spr_add_alpha ( "stage/district/judge_angry.png" , 15 , 0 , 0 , 16 , 24 );
  123. obj_stage_bg.judge_angrytalk = spr_add_alpha ( "stage/district/judge_angrytalk.png" , 12 , 0 , 0 , 16 , 24 );
  124. obj_stage_bg.judge_gavel = spr_add_alpha ( "stage/district/judge_gavel.png" , 12 , 0 , 0 , 17 , 28 );
  125. obj_stage_bg.judge_idle = spr_add_alpha ( "stage/district/judge_idle.png" , 15 , 0 , 0 , 16 , 24 );
  126. obj_stage_bg.judge_idletalk = spr_add_alpha ( "stage/district/judge_idletalk.png" , 12 , 0 , 0 , 16 , 24 );
  127. obj_stage_bg.judge_no = spr_add_alpha ( "stage/district/judge_no.png" , 16 , 0 , 0 , 16 , 24 );
  128. obj_stage_bg.judge_surprised = spr_add_alpha ( "stage/district/judge_surprised.png" , 15 , 0 , 0 , 16 , 24 );
  129. obj_stage_bg.judge_surprisedtalk = spr_add_alpha ( "stage/district/judge_surprisedtalk.png" , 12 , 0 , 0 , 16 , 24 );
  130. obj_stage_bg.judge_thinking = spr_add_alpha ( "stage/district/judge_thinking.png" , 1 , 0 , 0 , 16 , 24 );
  131. obj_stage_bg.judge_yes = spr_add_alpha ( "stage/district/judge_yes.png" , 5 , 0 , 0 , 16 , 24 );
  132.  
  133. obj_stage_bg.spectator_idle = spr_add_alpha ( "stage/district/spectator_idle.png" , 16 , 0 , 0 , 0 , 23 );
  134. obj_stage_bg.spectator_rant = spr_add_alpha ( "stage/district/spectator_rant.png" , 8 , 0 , 0 , 0 , 23 );
  135.  
  136. global.msk_stg[4] = spr_add_alpha ( 'stage/district/platform2.png' , 1 , 1 , 0 , 123 , 16 );
  137. //global.msk_stg[7] = spr_add_alpha ( 'stage/casinon/tree.png' , 3 , 0 , 0 , 0 , 0 );
  138. //global.msk_stg[4] = stage_msk_add ( 'stage/district/layoutproto.png' , 1 , 1 , 0 , 0 , 0 );
  139.  
  140. var i;
  141. i = instance_create ( top_x , top_y , obj_floor );
  142. i . sprite_index = global.msk_stg[0];
  143. i . image_xscale *= scale_x;
  144. i . image_yscale *= scale_y;
  145. i = instance_create ( top_x , top_y , obj_leftwall );
  146. i . sprite_index = global.msk_stg[1];
  147. i . image_xscale *= scale_x;
  148. i . image_yscale *= scale_y;
  149. i = instance_create ( top_x , top_y , obj_rightwall );
  150. i . sprite_index = global.msk_stg[2];
  151. i . image_xscale *= scale_x;
  152. i . image_yscale *= scale_y;
  153. i = instance_create ( top_x , top_y , obj_ceiling );
  154. i . sprite_index = global.msk_stg[3];
  155. i . image_xscale *= scale_x;
  156. i . image_yscale *= scale_y;
  157.  
  158. // Set the ledges.
  159.  
  160. instance_create ( top_x + 9 * scale_x , top_y + 122 * scale_y , obj_edge_left );
  161. instance_create ( top_x + 795 * scale_x , top_y + 122 * scale_y , obj_edge_right );
  162.  
  163. // Load and set up the background layers.
  164.  
  165. background_index[0] = bg_add ( "stage/district/bg.png" );
  166. kk = instance_create ( top_x , top_y , obj_stage_bgd ); kk . depth = 9;
  167. kk . sprite_index = bg_add ( 'stage/district\main.png' , 0 , 0 );
  168. kk . visible = 1;
  169. kk . image_xscale = scale_x;
  170. kk . image_yscale = scale_y;
  171. kk . image_blend = 16777215;
  172. kk . image_alpha = 1;
  173. obj_stage_bg.x = top_x;
  174. obj_stage_bg.y = top_y;
  175. obj_stage_bg.image_xscale = scale_x;
  176. obj_stage_bg.image_yscale = scale_y;
  177. kk = instance_create ( top_x , top_y , obj_stage_bgd ); kk . depth = -6;
  178. kk . sprite_index = bg_add ( 'stage/district\mainfront.png' , 0 , 0 );
  179. kk . visible = 1;
  180. kk . image_xscale = scale_x;
  181. kk . image_yscale = scale_y;
  182. kk . image_blend = 16777215;
  183. kk . image_alpha = 1;
  184.  
  185. kk = instance_create ( stg_width * 0.5 - 111.5 * scale_x , top_y - 48 , obj_stage_bgd ); kk . depth = 9;
  186. kk . sprite_index = bg_add ( 'stage/district\centerplatform.png' , 0 , 0 );
  187. kk . visible = 1;
  188. kk . image_xscale = scale_x;
  189. kk . image_yscale = scale_y;
  190. kk . image_blend = 16777215;
  191. kk . image_alpha = 1;
  192. kk = instance_create ( stg_width * 0.5 - 111.5 * scale_x , top_y - 48 , obj_stage_bgd ); kk . depth = -6;
  193. kk . sprite_index = bg_add ( 'stage/district\centerplatform2.png' , 0 , 0 );
  194. kk . visible = 1;
  195. kk . image_xscale = scale_x;
  196. kk . image_yscale = scale_y;
  197. kk . image_blend = 16777215;
  198. kk . image_alpha = 1;
  199. i = instance_create ( stg_width * 0.5 - 108.5 * scale_x , top_y - 48 + 15 * scale_y , obj_platform );
  200. i . image_xscale = 13.5625 * scale_x;
  201. i . image_yscale = 0.25;
  202.  
  203. with ( obj_stage_bg )
  204. //obj_stage_bg.bump_snd = sound_add ( "stage/casinon/bump.wav" , 0 , 0 );
  205. gavel = sound_add ( "stage/district/gavel.wav" , 0 , 0 );
  206. spectator_rant = sound_add ( "stage/district/gallery.wav" , 0 , 0 );
  207. apollo_deskslamtalk = sound_add ( "stage/district/apolloholdit.wav" , 0 , 0 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement