diff --git a/invasion-force/objects/obj_boss/Collision_obj_laser.gml b/invasion-force/objects/obj_boss/Collision_obj_laser.gml index d547d70..26e35f0 100644 --- a/invasion-force/objects/obj_boss/Collision_obj_laser.gml +++ b/invasion-force/objects/obj_boss/Collision_obj_laser.gml @@ -14,6 +14,10 @@ if(health <= 0) { global.scheduleBoss = true if(global.bossWins == 0) { global.bossWins += 1 + if(room != Arena) { + audio_stop_sound(snd_boss) + audio_play_sound(snd_level, 1, true) + } } instance_destroy() } \ No newline at end of file diff --git a/invasion-force/objects/obj_boss2/Collision_obj_laser.gml b/invasion-force/objects/obj_boss2/Collision_obj_laser.gml index c03ac76..c677917 100644 --- a/invasion-force/objects/obj_boss2/Collision_obj_laser.gml +++ b/invasion-force/objects/obj_boss2/Collision_obj_laser.gml @@ -18,6 +18,10 @@ if(health <= 0) { with (obj_beam) { instance_destroy() } + if(room != Arena) { + audio_stop_sound(snd_boss) + audio_play_sound(snd_level, 1, true) + } global.spawnEnemies = true global.spawnBoss = false global.bossWins += 1 diff --git a/invasion-force/objects/obj_boss3/Collision_obj_laser.gml b/invasion-force/objects/obj_boss3/Collision_obj_laser.gml index 3438039..de32dcf 100644 --- a/invasion-force/objects/obj_boss3/Collision_obj_laser.gml +++ b/invasion-force/objects/obj_boss3/Collision_obj_laser.gml @@ -10,6 +10,10 @@ if(health <= 0) { instance_create_layer(x + sprite_xoffset ,y + sprite_yoffset+20,"Instances",obj_explosion) instance_create_layer(x + sprite_xoffset-20 ,y + sprite_yoffset,"Instances",obj_explosion) instance_create_layer(x + sprite_xoffset ,y + sprite_yoffset-20,"Instances",obj_explosion) + if(room != Arena) { + audio_stop_sound(snd_boss) + audio_play_sound(snd_level, 1, true) + } global.spawnEnemies = true global.spawnBoss = false global.bossWins += 1 diff --git a/invasion-force/objects/obj_boss4/Collision_obj_laser.gml b/invasion-force/objects/obj_boss4/Collision_obj_laser.gml index a9bab31..d9b8a18 100644 --- a/invasion-force/objects/obj_boss4/Collision_obj_laser.gml +++ b/invasion-force/objects/obj_boss4/Collision_obj_laser.gml @@ -12,6 +12,10 @@ if(health <= 0) { instance_create_layer(x + sprite_xoffset ,y + sprite_yoffset+20,"Instances",obj_explosion) instance_create_layer(x + sprite_xoffset-20 ,y + sprite_yoffset,"Instances",obj_explosion) instance_create_layer(x + sprite_xoffset ,y + sprite_yoffset-20,"Instances",obj_explosion) + if(room != Arena) { + audio_stop_sound(snd_boss) + audio_play_sound(snd_level, 1, true) + } global.spawnEnemies = true global.spawnBoss = false global.bossWins += 1 diff --git a/invasion-force/objects/obj_boss5/Collision_obj_laser.gml b/invasion-force/objects/obj_boss5/Collision_obj_laser.gml index 57850e9..ee64d81 100644 --- a/invasion-force/objects/obj_boss5/Collision_obj_laser.gml +++ b/invasion-force/objects/obj_boss5/Collision_obj_laser.gml @@ -21,6 +21,10 @@ if(health <= 0) { instance_create_layer(x + sprite_xoffset ,y + sprite_yoffset+50,"Instances",obj_explosion) instance_create_layer(x + sprite_xoffset-50 ,y + sprite_yoffset,"Instances",obj_explosion) instance_create_layer(x + sprite_xoffset ,y + sprite_yoffset-50,"Instances",obj_explosion) + if(room != Arena) { + audio_stop_sound(snd_boss) + audio_play_sound(snd_level, 1, true) + } global.bossWins += 1 instance_destroy() } \ No newline at end of file diff --git a/invasion-force/objects/obj_enemy_spawn/Alarm_4.gml b/invasion-force/objects/obj_enemy_spawn/Alarm_4.gml index f133eb6..97b58b3 100644 --- a/invasion-force/objects/obj_enemy_spawn/Alarm_4.gml +++ b/invasion-force/objects/obj_enemy_spawn/Alarm_4.gml @@ -5,6 +5,10 @@ if(global.spawnEnemies || !global.alive) { global.spawnEnemies = false alarm[4] = 5 * room_speed } else if (global.spawnBoss) { + if(global.bossWins == 0) { + audio_stop_sound(snd_level) + audio_play_sound(snd_boss, 1, true) + } instance_create_layer(room_width / 2,0,"Instances",obj_boss) } else { global.scheduleBoss = true diff --git a/invasion-force/objects/obj_enemy_spawn/Alarm_6.gml b/invasion-force/objects/obj_enemy_spawn/Alarm_6.gml index ce9f73d..deb1c09 100644 --- a/invasion-force/objects/obj_enemy_spawn/Alarm_6.gml +++ b/invasion-force/objects/obj_enemy_spawn/Alarm_6.gml @@ -6,5 +6,7 @@ if(global.spawnEnemies || global.spawnBoss || !global.alive) { global.spawnBoss = false alarm[6] = 5 * room_speed } else { + audio_stop_sound(snd_level) + audio_play_sound(snd_boss, 1, true) instance_create_layer(room_width / 2 + 200,-100,"Instances",obj_boss2) } \ No newline at end of file diff --git a/invasion-force/objects/obj_enemy_spawn/Alarm_7.gml b/invasion-force/objects/obj_enemy_spawn/Alarm_7.gml index c7f6adc..dd8bad8 100644 --- a/invasion-force/objects/obj_enemy_spawn/Alarm_7.gml +++ b/invasion-force/objects/obj_enemy_spawn/Alarm_7.gml @@ -6,5 +6,7 @@ if(global.spawnEnemies || global.spawnBoss || !global.alive) { global.spawnBoss = false alarm[7] = 5 * room_speed } else { + audio_stop_sound(snd_level) + audio_play_sound(snd_boss, 1, true) instance_create_layer(100,100,"Instances",obj_boss3) } \ No newline at end of file diff --git a/invasion-force/objects/obj_enemy_spawn/Alarm_8.gml b/invasion-force/objects/obj_enemy_spawn/Alarm_8.gml index 8699c0e..c3efc19 100644 --- a/invasion-force/objects/obj_enemy_spawn/Alarm_8.gml +++ b/invasion-force/objects/obj_enemy_spawn/Alarm_8.gml @@ -6,5 +6,7 @@ if(global.spawnEnemies || global.spawnBoss || !global.alive) { global.spawnBoss = false alarm[8] = 5 * room_speed } else { + audio_stop_sound(snd_level) + audio_play_sound(snd_boss, 1, true) instance_create_layer(100,100,"Instances",obj_boss4) } \ No newline at end of file diff --git a/invasion-force/objects/obj_enemy_spawn/Alarm_9.gml b/invasion-force/objects/obj_enemy_spawn/Alarm_9.gml index f6f7910..8258984 100644 --- a/invasion-force/objects/obj_enemy_spawn/Alarm_9.gml +++ b/invasion-force/objects/obj_enemy_spawn/Alarm_9.gml @@ -6,5 +6,7 @@ if(global.spawnEnemies || global.spawnBoss || !global.alive) { global.spawnBoss = false alarm[9] = 5 * room_speed } else { + audio_stop_sound(snd_level) + audio_play_sound(snd_boss, 1, true) instance_create_layer(room_width/2,0,"Instances",obj_boss5) } \ No newline at end of file