Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.85 KB | None | 0 0
  1. ///Main Configuration
  2.  
  3. //Initialization
  4. draw_texture_flush();
  5. stringCurrentDate = string(current_day)+string(current_month)+string(current_year);
  6.  
  7. if (!global.isDaily) randomize();
  8. //else random_set_seed(global.dailySeed);
  9. joy_init();
  10.  
  11.  
  12. global.gameOver = false;
  13. global.relicDetected = false;
  14. global.overrideLevel = noone;
  15.  
  16.  
  17. global.steamApi = false;
  18.  
  19. if (steam_initialised())
  20. {
  21. if (steam_stats_ready()) && (steam_is_overlay_enabled())
  22. {
  23. global.steamApi = true;
  24. }
  25. else show_debug_message('ERROR: Steam Stats Not Accessible At This Time');
  26. }
  27. else show_debug_message('ERROR: Steam not initialized');
  28.  
  29.  
  30.  
  31. //Camera and Crosshair
  32. global.crosshairX[1] = 0;
  33. global.crosshairY[1] = 0;
  34. global.crosshair_scale[1] = 1;
  35. global.crosshairX[2] = 0;
  36. global.crosshairY[2] = 0;
  37. global.crosshair_scale[2] = 1;
  38.  
  39. global.default_shadow_yscale = 0.3;
  40. global.music = true;
  41.  
  42. main_camera = instance_create(x,y,controller_camera);
  43. main_effects = instance_create(x,y,controller_effects);
  44.  
  45. level_end = false;
  46. global.level_complete = false;
  47. global.pause = 0;
  48.  
  49. view_xview[0] = x;
  50. view_yview[0] = y;
  51.  
  52. //Survival Mode Configuration
  53. global.survivalWaves = 0;
  54. survivalWaveSize = 0;
  55.  
  56. if (room == levelHalloween_3) {global.survivalWaves = 3; survivalWaveSize = 3;}
  57.  
  58. //Combat Options
  59. global.autoAimAngle = 38;
  60. global.precisionAngle = 20;
  61. global.precisionDistance = 32;
  62. global.friendlyFireDamageRatio = 0.7;
  63. global.enemyProjectileSpeed = 0.8;
  64.  
  65. //Level Build
  66. level_built = false;
  67.  
  68. //Pathfinding
  69. path_refresh = room_speed*1; // Updates the grid once per second
  70. alarm[1] = path_refresh;
  71. global.astar_grid = mp_grid_create(0,0,round(room_width/64),round(room_height/64),64,64);
  72. mp_grid_add_instances(global.astar_grid,class_solid,false);
  73.  
  74. //Debug Pathfinding
  75. global.drawGridDebug = false;
  76.  
  77. //GUI
  78. guiSurface = surface_create(1920,1080);
  79. global.total_value = 0;
  80. score_time = room_speed*1.2;
  81. score_time_current = 0;
  82. score_value = 10;
  83. score_string = 'KILL';
  84.  
  85. guiShieldAlertDraw = false;
  86. guiShieldAlertTime = room_speed*0.5;
  87. guiShieldAlertTimeCurrent = 0;
  88.  
  89. guiReloadAlertDraw = false;
  90. guiReloadAlertTime = room_speed*0.5;
  91. guiReloadAlertTimeCurrent = 0;
  92.  
  93. //Dynamic GUI
  94. global.dynamicBounty = instance_create(0,0,gui_dynamic_bounty);
  95. global.dynamicRelic1 = instance_create(0,0,gui_dynamic_relic1);
  96. global.dynamicRelic2 = instance_create(0,0,gui_dynamic_relic2);
  97. global.dynamicRelic3 = instance_create(0,0,gui_dynamic_relic3);
  98. global.dynamicAmmo1 = instance_create(0,0,gui_dynamic_ammo1);
  99. global.dynamicAmmo2 = instance_create(0,0,gui_dynamic_ammo2);
  100.  
  101. delayedAmmoLightBar[1] = 1;
  102. delayedAmmoMediumBar[1] = 2;
  103. delayedAmmoHeavyBar[1] = 3;
  104. delayedCharHealthBar1[1] = 4;
  105. delayedCharShieldBar1[1] = 5;
  106. delayedAmmoLightBar[2] = 6;
  107. delayedAmmoMediumBar[2] = 7;
  108. delayedAmmoHeavyBar[2] = 8;
  109. delayedCharHealthBar1[2] = 9;
  110. delayedCharShieldBar1[2] = 10;
  111. delayedP1AmmoBar = 11;
  112. delayedP2AmmoBar = 12;
  113. draw_healthbar_delayed_init(delayedAmmoLightBar[1]);
  114. draw_healthbar_delayed_init(delayedAmmoMediumBar[1]);
  115. draw_healthbar_delayed_init(delayedAmmoHeavyBar[1]);
  116. draw_healthbar_delayed_init(delayedCharHealthBar1[1]);
  117. draw_healthbar_delayed_init(delayedCharShieldBar1[1]);
  118. draw_healthbar_delayed_init(delayedAmmoLightBar[2]);
  119. draw_healthbar_delayed_init(delayedAmmoMediumBar[2]);
  120. draw_healthbar_delayed_init(delayedAmmoHeavyBar[2]);
  121. draw_healthbar_delayed_init(delayedCharHealthBar1[2]);
  122. draw_healthbar_delayed_init(delayedCharShieldBar1[2]);
  123. draw_healthbar_delayed_init(delayedP1AmmoBar);
  124. draw_healthbar_delayed_init(delayedP2AmmoBar);
  125.  
  126. //BossFight GUI
  127. bossBar = 666;
  128. draw_healthbar_delayed_init(bossBar);
  129. isBossSetup = false;
  130. isGen1Setup = false;
  131. isGen2Setup = false;
  132. isGen3Setup = false;
  133. fakeBarFill = 0;
  134.  
  135. //Score
  136.  
  137. global.coins_turtle1 = 1;
  138. global.coins_turtle2 = 2;
  139. global.coins_turtle3 = 3;
  140. global.coins_duck1 = 3;
  141. global.coins_duck2 = 4;
  142. global.coins_duck3 = 5;
  143. global.coins_duck_prisoner = 7;
  144.  
  145. global.score_kill = 10;
  146. global.score_headshot = 5;
  147.  
  148. global.score_doublekill = 5;
  149. global.score_triplekill = 5;
  150. global.score_multikill = 10;
  151.  
  152. //Prices
  153. global.price_checkpoint1 = 1000;
  154. global.price_checkpoint2 = 3000;
  155. global.price_checkpoint3 = 6000;
  156. global.price_checkpoint4 = 9000;
  157. global.price_checkpoint5 = 12000;
  158.  
  159. global.price_pistol_assault = 650;
  160. global.price_pistol_heavy = 3000;
  161. global.price_pistol_plasma = 4200;
  162. global.price_shotgun = 1200;
  163. global.price_submachinegun = 2000;
  164. global.price_highmag = 4000;
  165. global.price_machinegun = 5000;
  166. global.price_assault_rifle = 5000;
  167. global.price_sniper_rifle = 5000;
  168. global.price_shotgun_heavy = 5000;
  169. global.price_rocketlauncher = 5000;
  170.  
  171. global.price_shield1 = 1000;
  172. global.price_shield2 = 3000;
  173. global.price_light1 = 300;
  174. global.price_light2 = 300;
  175. global.price_medium1 = 500;
  176. global.price_medium2 = 850;
  177. global.price_heavy1 = 500;
  178. global.price_heavy2 = 750;
  179. global.price_heavy3 = 750;
  180. global.price_heavy4 = 750;
  181. global.price_grenades1 = 1000;
  182. global.price_grenades2 = 1500;
  183. global.price_grenades3 = 1500;
  184.  
  185. global.price_pineapple1 = 1500;
  186. global.price_pineapple2 = 1500;
  187. global.price_pineapple3 = 1500;
  188. global.price_alcoholic1 = 1500;
  189. global.price_alcoholic2 = 1500;
  190. global.price_alcoholic3 = 1500;
  191. global.price_crystal1 = 3000;
  192. global.price_crystal2 = 4500;
  193. global.price_crystal3 = 4500;
  194. global.price_infinity1 = 4500;
  195. global.price_infinity2 = 4500;
  196. global.price_infinity3 = 4500;
  197. global.price_midnight1 = 4000;
  198. global.price_midnight2 = 4000;
  199. global.price_midnight3 = 4000;
  200. global.price_watchful1 = 2500;
  201. global.price_watchful2 = 2500;
  202. global.price_watchful3 = 2500;
  203. global.price_dev1 = 3500;
  204. global.price_dev2 = 4500;
  205. global.price_dev3 = 4500;
  206. global.price_yottabyte1 = 1750;
  207. global.price_yottabyte2 = 1750;
  208. global.price_yottabyte3 = 1750;
  209.  
  210. //Players & Ammo
  211.  
  212. global.friendlyFire = false;
  213.  
  214. global.reviveHealth = 0.5;
  215. global.reviveAmmoLight = 160;
  216. global.reviveAmmoMedium = 100;
  217. global.reviveAmmoHeavy = 160;
  218.  
  219. global.ammo_light_max = 360;
  220. global.ammo_medium_max = 280;
  221. global.ammo_heavy_max = 400;
  222. global.grenades_max = 5;
  223.  
  224. global.ammoDropChanceLight = 0.1;
  225. global.ammoDropChanceMedium = 0.035;
  226. global.ammoDropChanceHeavy = 0.025;
  227. global.ammoDropLowThreshold = 0.15;
  228. global.ammoDropEquippedBonus = 0.1;
  229. global.ammoDropLowBonus = 0.1;
  230.  
  231. ammo_light_max_regular = global.ammo_light_max;
  232. ammo_medium_max_regular = global.ammo_medium_max;
  233. ammo_heavy_max_regular = global.ammo_heavy_max;
  234. grenades_max_regular = global.grenades_max;
  235.  
  236. ammo_light_max_relic = 250;
  237. ammo_medium_max_relic = 150;
  238. ammo_heavy_max_relic = 250;
  239. grenades_max_relic = global.grenades_max;
  240. grenades_max_biu = 10;
  241.  
  242. draw_ammo1 = 0;
  243. draw_ammo2 = 0;
  244.  
  245. //Relics
  246. global.midnightDamageMultiplier = 0.5;
  247. global.crystalBaconRegen = 8;
  248. global.devPotionRegenTime = room_speed*0.75;
  249. global.watchfulEyePickupBonus = 1.5;
  250. global.relicHpBonus = 1;
  251. global.relicEnergyBonus = 1;
  252. awarded4RelicsAchievement = false;
  253.  
  254. //Audio
  255. global.falloffMainDist = 1280;
  256. global.falloffMainMax = 2000;
  257. global.falloffMainFactor = 1;
  258.  
  259. global.falloffMediumDist = 600;
  260. global.falloffMediumMax = 1500;
  261. global.falloffMediumFactor = 1;
  262.  
  263. global.falloffMinorDist = 280;
  264. global.falloffMinorMax = 1000;
  265. global.falloffMinorFactor = 1;
  266.  
  267. //Stats
  268. timeCounter = 0;
  269. gameOverHint = '';
  270.  
  271. //Endless Score
  272. global.scoreEndlessLevel = 600;
  273. global.scoreEndlessLoop = 2000;
  274. global.scoreEndlessLoopMultiplier = 2;
  275.  
  276. //Daily Score
  277. global.dailyChecked = 0;
  278. global.dailyPlayers = -1;
  279. global.dailyBadge = 0;
  280. global.dailyBadgeString = "";
  281. global.dailyRankDebug = -1;
  282.  
  283. //Pause Menu
  284. game_pause_init();
  285.  
  286. //Center Mouse Position At Beggining
  287. display_mouse_set(window_get_width() / 2, window_get_height() / 2);
  288.  
  289. //Low Performance Detection
  290. global.lowPerfTime = room_speed*4.2;
  291. global.lowPerfTimeCurrent = 0;
  292.  
  293. debug_forceLevelExit = false;
  294.  
  295. ///Enemy Tracker
  296. global.edgeTrackEnemyList = noone;
  297.  
  298. //if room = level4_1 { room_goto(room_start)}//DEMO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement