Guest User

Untitled

a guest
Apr 17th, 2026
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None | 0 0
  1. O_ASE
  2. ~~~~~~~~~~~~~~~
  3. Create
  4. ~~~~~~~~~~~~~~~
  5. global.PauseBack = 0;
  6. Area = Internet1;
  7. EncounterTimer = 60;
  8. MobList = array_create(10,0);
  9. Amount = array_create(10,0);
  10. spawnloop = 0;
  11. MobList[0] = O_Turtle;
  12. Mob = MobList[0];
  13. CurrMobs = [];
  14. Turtles = [];
  15. Turtle = ds_list_create();
  16. SpawnList = array_create(9,0);
  17. SpawnList[0] = inst_471557F3;
  18. SpawnList[1] = inst_5D3453B4;
  19. SpawnList[2] = inst_28E729A2;
  20. SpawnList[3] = inst_18E3ADA1;
  21. SpawnList[4] = inst_56AA757B;
  22. SpawnList[5] = inst_607E8697;
  23. SpawnList[6] = inst_476A1212;
  24. SpawnList[7] = inst_76641658;
  25. SpawnList[8] = inst_710AA885;
  26.  
  27. activeturt = 0;
  28.  
  29. WizX = O_WIZARD.x;
  30. WizY = O_WIZARD.y;
  31.  
  32. Zeni = 0;
  33. num = 0;
  34. pause = false;
  35. fight = false;
  36. ~~~~~~~~~~~~~~~
  37. Clean up
  38. ~~~~~~~~~~~~~~~
  39.  
  40. if(sprite_exists(global.PauseBack)){
  41.  
  42. sprite_delete(global.PauseBack);
  43.  
  44. }
  45.  
  46. ~~~~~~~~~~~~~~~
  47. Step
  48. ~~~~~~~~~~~~~~~
  49.  
  50. key_esc = keyboard_check(vk_escape);
  51. key_R = keyboard_check_pressed(ord("R"));
  52. key_backsp = keyboard_check_pressed(vk_backspace);
  53. key_enter = keyboard_check_pressed(vk_enter);
  54.  
  55. if(key_esc){
  56.  
  57. game_end();
  58.  
  59. }
  60.  
  61. if(key_R){
  62.  
  63. game_restart();
  64.  
  65. }
  66.  
  67. if(EncounterTimer = 0){
  68.  
  69. instance_create_depth(camera_get_view_width(0)/2,camera_get_view_height(0)/2,-200,O_BattleGround);
  70. EncounterTimer = irandom_range(500,1000);
  71. WizX = O_WIZARD.x;
  72. WizY = O_WIZARD.y;
  73. instance_deactivate_object(O_WIZARD);
  74.  
  75. }
  76.  
  77. if(room = Battleroom1) && (!instance_exists(O_EnemyParent)) && (pause = false) && (fight = false){
  78.  
  79. room = Area;
  80.  
  81. }
  82.  
  83. //if(instance_number(O_Turtle) <= 0){
  84.  
  85. // ds_list_clear(Turtle);
  86.  
  87. //}
  88.  
  89. if(key_backsp){
  90.  
  91. if(pause == true){
  92.  
  93. instance_activate_all();
  94. pause = false;
  95. if(instance_exists(O_Turtle)){
  96.  
  97. activeturt = Turtle[|irandom_range(0,ds_list_size(Turtle)-1)]
  98.  
  99. }
  100.  
  101. }
  102. else{
  103.  
  104. global.PauseBack=sprite_create_from_surface(application_surface,0,0,1000,1000,0,1,0,0);
  105. instance_deactivate_all(true);
  106. pause = true;
  107.  
  108. }
  109.  
  110.  
  111. }
  112.  
  113. if(fight = true){
  114.  
  115. if(key_enter){
  116.  
  117. //creates chip selecting menu
  118. instance_activate_all();
  119. fight = false;
  120. O_BattleMC.enter = true;
  121.  
  122. }
  123.  
  124.  
  125. }
  126.  
  127.  
  128. ~~~~~~~~~~~~~~~
  129. Alarm[0]
  130. ~~~~~~~~~~~~~~~
  131.  
  132. global.PauseBack=sprite_create_from_surface(application_surface,0,0,1000,1000,0,1,0,0);
  133. instance_deactivate_all(true);
  134. fight = true;
  135.  
  136.  
  137. instance_create_depth(250,300,-2,O_ChipSlot);
  138. instance_create_depth(350,300,-2,O_ChipSlot);
  139. child = instance_create_depth(450,300,-2,O_ChipSlot);
  140. child.image_xscale = 2;
  141. instance_create_depth(250,300,-10,O_Selector);
  142.  
  143.  
  144. ~~~~~~~~~~~~~~~
  145. Draw
  146. ~~~~~~~~~~~~~~~
  147.  
  148. //draw_text(x,y-50,string(ds_list_size(Turtle)));
  149. //draw_text(x,y+50,string(Turtle[|0]));
  150. draw_set_font(Verdana24);
  151. if(pause == true){
  152.  
  153. draw_sprite_ext(global.PauseBack,0,0,0,1,1,0,c_white,1);
  154. draw_text(room_width/2 - string_width("PAUSED")/2,room_height/2,"PAUSED");
  155.  
  156. }
  157.  
  158. if(fight == true){
  159.  
  160. draw_sprite_ext(global.PauseBack,0,0,0,1,1,0,c_white,1);
  161. draw_text(room_width/2 - string_width("PRESS ENTER")/2,room_height/2,"PRESS ENTER");
  162.  
  163. }
  164.  
  165. ~~~~~~~~~~~~~~~
  166. Room Start
  167. ~~~~~~~~~~~~~~~
  168.  
  169. if (room = Battleroom1){
  170. diceroll = 0; //determines what kinds of mobs, how many, what mixes
  171.  
  172. //different spawn rates in different areas/rooms
  173. if(Area = Internet1){
  174.  
  175. if(diceroll == 0){
  176.  
  177. spawnloop = 2;
  178. while (spawnloop > 0){
  179.  
  180. spawn = SpawnList[irandom_range(0,8)];
  181. Mob = O_Turtle
  182. if(!place_meeting(spawn.x,spawn.y,O_EnemyParent)){
  183.  
  184. child = instance_create_depth(spawn.x,spawn.y,-2,Mob);
  185. if(child.object_index = O_Turtle){
  186.  
  187. ds_list_add(Turtle,child);
  188.  
  189. }
  190. spawnloop -= 1;
  191.  
  192. }
  193.  
  194. }
  195.  
  196. }
  197.  
  198. }
  199. // battle starts paused to select chips
  200. alarm[0] = 2;
  201.  
  202.  
  203.  
  204. }
  205.  
  206. if(instance_exists(O_Turtle)){
  207.  
  208. activeturt = Turtle[|irandom_range(0,ds_list_size(Turtle)-1)]
  209.  
  210. }
  211.  
  212. if(room != Battleroom1){
  213.  
  214. Area = room;
  215.  
  216. }
  217. if(room = Area){
  218.  
  219. O_WIZARD.x = WizX;
  220. O_WIZARD.y = WizY;
  221.  
  222. }
  223.  
Advertisement
Add Comment
Please, Sign In to add comment