SHARE
TWEET

Untitled

a guest Mar 25th, 2017 370 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define step
  2. if instance_exists(FloorMaker) {
  3.     /*with(FloorMaker) goal = 220
  4.     with(GenCont) goal = 220*/
  5.     //110 is the default number of floors
  6.     with (GameCont) if irandom(5) = 1
  7.     //raising 5 makes bigger areas, lowering it makes smaller areas
  8.     {
  9.         if subarea = 3
  10.         {
  11.         if hard >= 0 and hard <= 4 and area != 100
  12.         area = 1
  13.         if hard >= 5 and hard <= 8 and area != 100
  14.         area = choose(1,3)
  15.         if hard >= 9 and hard <= 12 and area != 100
  16.         area = choose(1,3,5)
  17.         if hard >= 13 and hard <= 15 and area != 100
  18.         area = choose(1,3,5,7)
  19.         }
  20.         else if area = 1 or area = 2 or area = 3 or area = 4 or area = 5 or area = 6 or area = 7
  21.         area = irandom_range(1, 7);
  22.         if (area != 7) {
  23.             subarea = irandom_range(1, 3);
  24.         } else subarea = irandom_range(1, 2);
  25.     }
  26. }
  27. postfix();
  28. #define postfix
  29. // Catch the moment of GenCont finishing it's job:
  30. if (instance_exists(GenCont)) {
  31.     wait 1;
  32.     if (instance_exists(GenCont)) exit;
  33. } else exit;
  34. //
  35. with (Wall) if ("converted" not in self) {
  36.     converted = true;
  37.     var _area = string(area_nearest(x, y));
  38.     sprite_index = asset_get_index("sprWall" + _area + "Bot");
  39.     outspr = asset_get_index("sprWall"+_area+"Out")
  40.     topspr = asset_get_index("sprWall"+_area+"Top")
  41. }
  42. with (TopSmall) if ("converted" not in self) {
  43.     converted = true;
  44.     sprite_index = asset_get_index("sprWall" + string(area_nearest(x, y)) + "Top");
  45. }
  46. with enemy
  47. //this does the thing where an enemy spawns in its respective area
  48. {
  49.     if "converted" not in self
  50.     converted = 0
  51.     if object_index != Maggot and object_index != BanditBoss and object_index != ScrapBoss and object_index != LilHunter and object_index != Nothing and object_index != FastRat and converted = 0
  52.     {
  53.     if area_nearest(x,y) = 1
  54.     instance_change(choose(Bandit,Scorpion,BigMaggot,Maggot),true)
  55.     if area_nearest(x,y) = 2
  56.     instance_change(choose(Rat,Ratking,Exploder,Bandit,MeleeBandit),true)
  57.     if area_nearest(x,y) = 3
  58.     instance_change(choose(Raven,Sniper,Salamander,Bandit,MeleeBandit),true)
  59.     if area_nearest(x,y) = 4
  60.     instance_change(choose(Spider,LaserCrystal),true)
  61.     if area_nearest(x,y) = 5
  62.     instance_change(choose(SnowBot,Wolf,SnowTank,Bandit),true)
  63.     if area_nearest(x,y) = 6
  64.     instance_change(choose(Necromancer,Freak,ExploFreak,RhinoFreak),true)
  65.     if area_nearest(x,y) = 7
  66.     instance_change(choose(Guardian,DogGuardian,ExploGuardian),true)
  67.     converted = 1
  68.     }
  69. }
  70. #define area_nearest(x, y)
  71. var q = instance_nearest(x, y, Floor);
  72. if ("area" not in q) {
  73.     var r = real(string_delete(sprite_get_name(q.sprite_index), 1, 8));
  74.     q.area = r;
  75.     return r;
  76. } else return q.area;
  77. /*#define draw
  78. if "wave" not in self
  79. wave = 0
  80. if GameCont.area = 1 or GameCont.area = 3 or GameCont.area = 5
  81. if GameCont.subarea = 3
  82. {
  83. draw_sprite(sprCharSplat,3,view_xview,view_yview+240)
  84. if GameCont.area = 1
  85. draw_sprite(sprBanditBossIdle,0.4*wave,view_xview+16,view_yview+224)
  86. wave += 1
  87. if GameCont.area = 3
  88. draw_sprite(sprScrapBossIdle,0.4*wave,view_xview+48,view_yview+216)
  89. if GameCont.area = 5
  90. draw_sprite(sprLilHunter,0.4*wave,view_xview+16,view_yview+224)
  91. }*/
RAW Paste Data
Top