diff --git a/AM2R.project.gmx b/AM2R.project.gmx
index 76a14dd..749bf78 100644
--- a/AM2R.project.gmx
+++ b/AM2R.project.gmx
@@ -4329,12 +4329,12 @@
-
-
-
-
+
+
+
+
diff --git a/objects/oBoss1Head.object.gmx b/objects/oBoss1Head.object.gmx
index 873487a..15d2330 100644
--- a/objects/oBoss1Head.object.gmx
+++ b/objects/oBoss1Head.object.gmx
@@ -65,11 +65,15 @@ sparkcounter = 0;
//~TIMING~//
enum BOSS1_ATTACKTIME {
- Initial = 120,
- Normal = 90
+ INITIAL = 120,
+ NORMAL = 90
}
+
+//these didn't work right after the refactor
+//I think I made him too efficient lol
/*
+
enum BOSS1_INTRO { //old times
MoveTiles0 = 60,
MoveTiles1 = 92,
@@ -80,28 +84,29 @@ enum BOSS1_INTRO { //old times
Animate = 220,
ToNormal = 280
}
+
*/
enum BOSS1_INTRO {
- MoveTiles0 = 60,
- MoveTiles1 = 92,
- PlayMusic = 90,
- FadeIn = 120,
- ScanEvent = 150,
- Quake = 160,
- Animate = 180,
- ToNormal = 200
+ MOVETILES0 = 60,
+ MOVETILES1 = 92,
+ PLAYMUSIC = 90,
+ FADEIN = 120,
+ SCANEVENT = 150,
+ QUAKE = 160,
+ ANIMATE = 180,
+ TONORMAL = 200
}
enum BOSS1_ATTACK {
- EyeFlash = 5,
- Attack = 80,
- ToNormal = 120
+ EYEFLASH = 5,
+ ATTACK = 80,
+ TONORMAL = 120
}
enum BOSS1_DEATH {
- Burn = 1,
- Explode = 250
+ BURN = 1,
+ EXPLODE = 250
}
@@ -136,7 +141,9 @@ EdgeStepAmount = 16;
1
- expl = instance_create(x - 16 + random(32), y - 8 + random(24), oFXAnimSpark);
+ ///Burn Timer
+
+expl = instance_create(x - 16 + random(32), y - 8 + random(24), oFXAnimSpark);
expl.image_speed = 0.5;
expl.additive = 0;
expl.sprite_index = sExpl1;
@@ -164,7 +171,9 @@ alarm[1] = 5;
1
- if (state == 1) {
+ ///Attack Timer
+
+if (state == 1) {
state = 2;
statetime = 0;
@@ -199,7 +208,6 @@ alarm[1] = 5;
wall1.x = edge_l - 64;
wall2.x = edge_r + 32;
- //why is this here if collision tiles exist for these walls?
with (oCharacter) {
if (x < oBoss1Head.edge_l - 16) x = oBoss1Head.edge_l - 16;
if (x > oBoss1Head.edge_r + 16) x = oBoss1Head.edge_r + 16;
@@ -241,194 +249,6 @@ if (fxtimer < 5) {
fxtimer += 1;
} else fxtimer = 0;
if (flashing > 0) flashing -= 1;
-
-//old code//
-
-/*if (state == 0) {
- if (statetime == 90) {
- mus_play(musAncientGuardian);
- oMusicV2.bossbgm = musAncientGuardian;
- }
- if (statetime > 60 && statetime <= 92) {
- tile_layer_shift(-99, -1, 0);
- tile_layer_shift(-98, 1, 0);
- }
- if (statetime > 120 && image_alpha < 1) image_alpha += 0.05;
- if (statetime == 120) sfx_play(sndBoss1Appear);
- if (statetime > 150 && y < 64) y += 0.5;
- if (statetime == 150) scan_log(32, get_text("ScanEvents", "ScanMechanism"), 180, 0);
- if (statetime == 210) {
- quake = instance_create(0, 0, oQuake);
- quake.delay = 0;
- quake.duration = 10;
- quake.intensity = 2;
- }
- if (statetime > 220 && floor(image_index) < 5) image_index += 0.2;
- if (statetime == 280) {
- state = 1;
- statetime = 0;
- canbehit = 1;
- alarm[0] = AttackTime[0];
- image_index = 5;
- }
-} // if (state == 0)
-if (state == 1) {
- hitbeam = 1;
- hitmissile = 1;
- hitbomb = 1;
- hitpbomb = 1;
- if (image_index > 5) image_index -= 0.5;
- if (x > oCharacter.x) hspeed -= 0.1;
- if (x < oCharacter.x) hspeed += 0.1;
- if (x < edge_l && hspeed < 0) hspeed = 0;
- if (x > edge_r && hspeed > 0) hspeed = 0;
- if (hspeed > 3) hspeed = 3;
- if (hspeed < -3) hspeed = -3;
- if (myhealth < 600) {
- edge_l = 80;
- edge_r = 240;
- phase = 1;
- movetime = 90;
- }
- if (myhealth < 500) {
- edge_l = 96;
- edge_r = 224;
- phase = 2;
- movetime = 70;
- }
- if (myhealth < 450) {
- edge_l = 112;
- edge_r = 208;
- phase = 3;
- movetime = 60;
- }
- if (myhealth < 300) {
- edge_l = 128;
- edge_r = 192;
- phase = 4;
- movetime = 50;
- }
- if (myhealth < 150) {
- edge_l = 144;
- edge_r = 176;
- phase = 5;
- movetime = 30;
- }
-} // if (state == 1)
-if (state == 2) {
- speed = 0;
- hitbeam = 0;
- hitmissile = 0;
- hitbomb = 0;
- hitpbomb = 0;
- /* if (statetime == 1) {
- attack = floor(random(4));
- if (phase >= 4) {
- if (attack == 0) attack = 2;
- }
- }
- if (image_index < 9) image_index += 0.25;
- if (statetime == 5) {
- eyes = instance_create(x, y, oBoss1Eyes); // og y + 14
- eyes.image_index = attack;
- if (attack == 0) sfx_play(sndBoss1Eyes2);
- if (attack == 1) sfx_play(sndBoss1Eyes1);
- if (attack == 2) sfx_play(sndBoss1Eyes4);
- if (attack == 3) sfx_play(sndBoss1Eyes3);
- }
- if (statetime == 80) {
- if (attack == 0) {
- instance_create(x, y + 12, oBoss1FBall);
- sfx_play(sndBoss1FBall);
- }
- if (attack == 1) {
- prj1 = instance_create(x + 4, y + 18, oBoss1FBall2);
- prj2 = instance_create(x - 4, y + 18, oBoss1FBall2);
- prj3 = instance_create(x + 4, y + 18, oBoss1FBall2);
- prj4 = instance_create(x - 4, y + 18, oBoss1FBall2);
- prj5 = instance_create(x + 4, y + 18, oBoss1FBall2);
- prj6 = instance_create(x - 4, y + 18, oBoss1FBall2);
- prj1.hspeed = 3;
- prj2.hspeed = -3;
- prj3.hspeed = 6;
- prj4.hspeed = -6;
- prj5.hspeed = 9;
- prj6.hspeed = -9;
- sfx_play(sndBoss1FBall);
- }
- if (attack == 2) {
- prj1 = instance_create(x + 6, y + 11, oBoss1Beam);
- prj2 = instance_create(x - 6, y + 11, oBoss1Beam);
- prj1.image_xscale = -1;
- sfx_play(sndBoss1Laser);
- }
- if (attack == 3) {
- prj1 = instance_create(x + 4, y + 18, oBoss1FBall3);
- prj2 = instance_create(x - 4, y + 18, oBoss1FBall3);
- prj3 = instance_create(x + 4, y + 18, oBoss1FBall3);
- prj4 = instance_create(x - 4, y + 18, oBoss1FBall3);
- prj5 = instance_create(x + 4, y + 18, oBoss1FBall3);
- prj6 = instance_create(x - 4, y + 18, oBoss1FBall3);
- prj1.hspeed = 0.4;
- prj1.time = 60;
- prj2.hspeed = -0.4;
- prj2.time = 70;
- prj3.hspeed = 1.2;
- prj3.time = 80;
- prj4.hspeed = -1.2;
- prj4.time = 90;
- prj5.hspeed = 2;
- prj5.time = 100;
- prj6.hspeed = -2;
- prj6.time = 110;
- sfx_play(sndBoss1FBall);
- }
- } // if (statetime == 80)
- if (statetime == 120) {
- state = 1;
- alarm[0] = AttackTime[1];
- }
-} // if (state == 2)
-if (state == 100) {
- speed = 0;
- canbehit = 0;
- if (statetime == 1) {
- alarm[1] = 1;
- /* sfx_play(sndBoss1Death);
- with (wall1) instance_destroy();
- with (wall2) instance_destroy();
- with (wheel) instance_destroy();
- with (block1) event_user(0);
- with (block2) event_user(0);
- with (inst_107511) instance_destroy();
- global.event[51] = 1;
- mus_fadeout(musAncientGuardian);
- oMusicV2.bossbgm = sndJump;
- mus_current_fadein();
- event_user(5);
- }
- if (statetime == 250) {
- repeat (10) {
- expl = instance_create(x - 16 + random(32), y - 16 + random(32), oFXAnimSpark);
- expl.image_speed = 0.5 + random(0.5);
- expl.additive = 0;
- expl.sprite_index = sExpl1;
- expl.direction = 180 + random(180);
- expl.speed = 2 + random(1);
- }
- repeat (10) make_explosion3(x + random_range(-30, 30), y + random_range(-30, 30));
- repeat (60) instance_create(x, y + 28, oDebris);
- spawn_many_powerups(128, 80, 64, 64);
- instance_create(x, y, oScreenFlash);
- sfx_play(sndBoss1Stomp);
- sfx_play(sndSMissileExpl);
- quake = instance_create(0, 0, oQuake);
- quake.delay = 0;
- quake.duration = 15;
- quake.intensity = 8;
- instance_destroy();
- }
-} // if (state == 100)*/
@@ -486,7 +306,7 @@ hitbeam = 1;
hitmissile = 1;
hitbomb = 1;
hitpbomb = 1;
-alarm[0] = BOSS1_ATTACKTIME.Initial;
+alarm[0] = BOSS1_ATTACKTIME.NORMAL;
image_index = 5;
@@ -549,12 +369,12 @@ speed = 0;
canbehit = 0;
switch (statetime) {
- case BOSS1_DEATH.Burn :
+ case BOSS1_DEATH.BURN :
alarm[1] = 1;
event_user(5);
break;
- case BOSS1_DEATH.Explode :
+ case BOSS1_DEATH.EXPLODE :
repeat (10) {
expl = instance_create(x - 16 + random(32), y - 16 + random(32), oFXAnimSpark);
expl.image_speed = 0.5 + random(0.5);
@@ -609,7 +429,7 @@ hitpbomb = 0;
if (image_index < 9) image_index += 0.25;
switch (statetime) {
- case BOSS1_ATTACK.EyeFlash : //Telegrah
+ case BOSS1_ATTACK.EYEFLASH : //Telegraph
eyes = instance_create(x, y, oBoss1Eyes); // og y + 14
eyes.image_index = attack;
switch (attack){
@@ -620,7 +440,7 @@ switch (statetime) {
}
break;
- case BOSS1_ATTACK.Attack : //Attack
+ case BOSS1_ATTACK.ATTACK : //Attack
switch (attack) {
case 0 : //Yellow Fire Ball
instance_create(x, y + 12, oBoss1FBall);
@@ -675,7 +495,7 @@ switch (statetime) {
break;
- case BOSS1_ATTACK.ToNormal : //To Normal State
+ case BOSS1_ATTACK.TONORMAL : //To Normal State
event_user(6);
break;
@@ -745,44 +565,46 @@ if(phase <= array_length_1d(PhaseProgression)){
1
///state: boss intro
+
//move tiles sideways
-if (statetime > BOSS1_INTRO.MoveTiles0 && statetime <= BOSS1_INTRO.MoveTiles1) {
+if (statetime > BOSS1_INTRO.MOVETILES0 && statetime <= BOSS1_INTRO.MOVETILES1) {
tile_layer_shift(-99, -1, 0);
tile_layer_shift(-98, 1, 0);
}
//fade in
-if (statetime > BOSS1_INTRO.FadeIn && image_alpha < 1) image_alpha += 0.05;
+if (statetime > BOSS1_INTRO.FADEIN && image_alpha < 1) image_alpha += 0.05;
//move down
-if (statetime > BOSS1_INTRO.PlayMusic && y < 64) y += 0.5;
+if (statetime > BOSS1_INTRO.PLAYMUSIC && y < 64) y += 0.5;
//animate
-if (statetime > BOSS1_INTRO.Animate && floor(image_index) < 5) image_index += 0.2;
+if (statetime > BOSS1_INTRO.ANIMATE && floor(image_index) < 5) image_index += 0.2;
switch(statetime){
- case BOSS1_INTRO.PlayMusic : //play music
+ case BOSS1_INTRO.PLAYMUSIC : //play music
mus_play(musAncientGuardian);
oMusicV2.bossbgm = musAncientGuardian;
break;
- case BOSS1_INTRO.FadeIn : //play appearance sound effect
+ case BOSS1_INTRO.FADEIN : //play appearance sound effect
sfx_play(sndBoss1Appear);
break;
- case BOSS1_INTRO.ScanEvent : //trigger scan event
+ case BOSS1_INTRO.SCANEVENT : //trigger scan event
scan_log(32, get_text("ScanEvents", "ScanMechanism"), 180, 0);
break;
- case BOSS1_INTRO.Quake : //trigger earthquake
+ case BOSS1_INTRO.QUAKE : //trigger earthquake
quake = instance_create(0, 0, oQuake);
quake.delay = 0;
quake.duration = 10;
quake.intensity = 2;
break;
- case BOSS1_INTRO.ToNormal : //go to normal state
+ case BOSS1_INTRO.TONORMAL : //go to normal state
event_user(6);
+ alarm[0] = BOSS1_ATTACKTIME.INITIAL;
break;
default : break;
diff --git a/objects/oConsole.object.gmx b/objects/oConsole.object.gmx
deleted file mode 100644
index 986f07f..0000000
--- a/objects/oConsole.object.gmx
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
diff --git a/scripts/scrConsoleCommandAdd.gml b/scripts/console_command_add.gml
similarity index 100%
rename from scripts/scrConsoleCommandAdd.gml
rename to scripts/console_command_add.gml
diff --git a/scripts/scrConsoleCommandRun.gml b/scripts/console_command_run.gml
similarity index 89%
rename from scripts/scrConsoleCommandRun.gml
rename to scripts/console_command_run.gml
index 8c3958a..0b91d42 100644
--- a/scripts/scrConsoleCommandRun.gml
+++ b/scripts/console_command_run.gml
@@ -16,7 +16,7 @@ if(string_char_at(ConsoleEntry, 1) == CommandPrefix){
//output set as : "command (arg1 / arg2)"
//these will be listed as new lines in the ConsoleHistory list. I provided an easy means of scrolling the history with the arrow keys
//recommend disabling input collection when using this and/or switching the controls around
- case COMMANDS.Help :
+ case COMMANDS.HELP :
if(ds_exists(ConsoleCommands, ds_type_map)){
var _commandKey = ds_map_find_first(ConsoleCommands);
@@ -44,7 +44,7 @@ if(string_char_at(ConsoleEntry, 1) == CommandPrefix){
}
//write the command to the console
- scrConsoleHistoryUpdate(_commandString);
+ console_history_update(_commandString);
_commandKey = ds_map_find_next(ConsoleCommands, _commandKey);
@@ -56,12 +56,8 @@ if(string_char_at(ConsoleEntry, 1) == CommandPrefix){
break;
- //toggles the debug boolean
- //true sets it to true
- //false sets it to false
- //default swaps its current value
- //like duhhh. I'm here treating you like you're 12 or sum shit
- case COMMANDS.Debug :
+ //included as an example of a debug toggle
+ case COMMANDS.DEBUG :
/*if(CommandArg == _command[1]){ global.DEBUG = true;}
if(CommandArg == _command[2]){ global.DEBUG = false;}
if(CommandArg == ""){ global.DEBUG = !global.DEBUG;}*/
diff --git a/scripts/scrConsoleHistoryUpdate.gml b/scripts/console_history_update.gml
similarity index 100%
rename from scripts/scrConsoleHistoryUpdate.gml
rename to scripts/console_history_update.gml
diff --git a/scripts/scrConsolePrint.gml b/scripts/console_print.gml
similarity index 100%
rename from scripts/scrConsolePrint.gml
rename to scripts/console_print.gml
diff --git a/scripts/scrConsoleInit.gml b/scripts/scrConsoleInit.gml
index 00f6a57..4bbd3ac 100644
--- a/scripts/scrConsoleInit.gml
+++ b/scripts/scrConsoleInit.gml
@@ -28,9 +28,9 @@ ConsoleViewLine = 0; //the currently viewed past entry
ConsoleCommands = ds_map_create();
enum COMMANDS{
-Help,
-Debug
+HELP,
+DEBUG
}
-scrConsoleCommandAdd(COMMANDS.Help, "help");
-scrConsoleCommandAdd(COMMANDS.Debug, "debug", "true", "false");
+console_command_add(COMMANDS.HELP, "help");
+console_command_add(COMMANDS.DEBUG, "debug", "true", "false");
diff --git a/scripts/scrConsoleMain.gml b/scripts/scrConsoleMain.gml
index dfa0c56..82a5e6e 100644
--- a/scripts/scrConsoleMain.gml
+++ b/scripts/scrConsoleMain.gml
@@ -1,4 +1,4 @@
-//Run this method in any step event. no extra code is required for it to run as intended
+//Run this script in any step event. no extra code is required for it to run as intended
//toggle the console
if(keyboard_check_pressed(global.CONSOLE_KEY)){
@@ -55,9 +55,9 @@ if(global.CONSOLE){
//I made that easy with a simple global variable that toggles the console
case vk_enter :
- scrConsoleCommandRun();
+ console_command_run();
- scrConsoleHistoryUpdate(ConsoleEntry);
+ console_history_update(ConsoleEntry);
ConsoleEntry = "";
CommandName = "";
CommandArg = "";