Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define step
- if instance_exists(FloorMaker) {
- /*with(FloorMaker) goal = 220
- with(GenCont) goal = 220*/
- //110 is the default number of floors
- with (GameCont) if irandom(5) = 1
- //raising 5 makes bigger areas, lowering it makes smaller areas
- {
- if subarea = 3
- {
- if hard >= 0 and hard <= 4 and area != 100
- area = 1
- if hard >= 5 and hard <= 8 and area != 100
- area = choose(1,3)
- if hard >= 9 and hard <= 12 and area != 100
- area = choose(1,3,5)
- if hard >= 13 and hard <= 15 and area != 100
- area = choose(1,3,5,7)
- }
- else if area = 1 or area = 2 or area = 3 or area = 4 or area = 5 or area = 6 or area = 7
- area = irandom_range(1, 7);
- if (area != 7) {
- subarea = irandom_range(1, 3);
- } else subarea = irandom_range(1, 2);
- }
- }
- postfix();
- #define postfix
- // Catch the moment of GenCont finishing it's job:
- if (instance_exists(GenCont)) {
- wait 1;
- if (instance_exists(GenCont)) exit;
- } else exit;
- //
- with (Wall) if ("converted" not in self) {
- converted = true;
- var _area = string(area_nearest(x, y));
- sprite_index = asset_get_index("sprWall" + _area + "Bot");
- outspr = asset_get_index("sprWall"+_area+"Out")
- topspr = asset_get_index("sprWall"+_area+"Top")
- }
- with (TopSmall) if ("converted" not in self) {
- converted = true;
- sprite_index = asset_get_index("sprWall" + string(area_nearest(x, y)) + "Top");
- }
- with enemy
- //this does the thing where an enemy spawns in its respective area
- {
- if "converted" not in self
- converted = 0
- 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
- {
- if area_nearest(x,y) = 1
- instance_change(choose(Bandit,Scorpion,BigMaggot,Maggot),true)
- if area_nearest(x,y) = 2
- instance_change(choose(Rat,Ratking,Exploder,Bandit,MeleeBandit),true)
- if area_nearest(x,y) = 3
- instance_change(choose(Raven,Sniper,Salamander,Bandit,MeleeBandit),true)
- if area_nearest(x,y) = 4
- instance_change(choose(Spider,LaserCrystal),true)
- if area_nearest(x,y) = 5
- instance_change(choose(SnowBot,Wolf,SnowTank,Bandit),true)
- if area_nearest(x,y) = 6
- instance_change(choose(Necromancer,Freak,ExploFreak,RhinoFreak),true)
- if area_nearest(x,y) = 7
- instance_change(choose(Guardian,DogGuardian,ExploGuardian),true)
- converted = 1
- }
- }
- #define area_nearest(x, y)
- var q = instance_nearest(x, y, Floor);
- if ("area" not in q) {
- var r = real(string_delete(sprite_get_name(q.sprite_index), 1, 8));
- q.area = r;
- return r;
- } else return q.area;
- /*#define draw
- if "wave" not in self
- wave = 0
- if GameCont.area = 1 or GameCont.area = 3 or GameCont.area = 5
- if GameCont.subarea = 3
- {
- draw_sprite(sprCharSplat,3,view_xview,view_yview+240)
- if GameCont.area = 1
- draw_sprite(sprBanditBossIdle,0.4*wave,view_xview+16,view_yview+224)
- wave += 1
- if GameCont.area = 3
- draw_sprite(sprScrapBossIdle,0.4*wave,view_xview+48,view_yview+216)
- if GameCont.area = 5
- draw_sprite(sprLilHunter,0.4*wave,view_xview+16,view_yview+224)
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement