Skip to content

Commit

Permalink
Boss music switch updated
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwatson484 committed Mar 14, 2021
1 parent b17d207 commit 149984c
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions invasion-force/objects/obj_boss/Collision_obj_laser.gml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
4 changes: 4 additions & 0 deletions invasion-force/objects/obj_boss2/Collision_obj_laser.gml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions invasion-force/objects/obj_boss3/Collision_obj_laser.gml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions invasion-force/objects/obj_boss4/Collision_obj_laser.gml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions invasion-force/objects/obj_boss5/Collision_obj_laser.gml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
4 changes: 4 additions & 0 deletions invasion-force/objects/obj_enemy_spawn/Alarm_4.gml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions invasion-force/objects/obj_enemy_spawn/Alarm_6.gml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 2 additions & 0 deletions invasion-force/objects/obj_enemy_spawn/Alarm_7.gml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 2 additions & 0 deletions invasion-force/objects/obj_enemy_spawn/Alarm_8.gml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
2 changes: 2 additions & 0 deletions invasion-force/objects/obj_enemy_spawn/Alarm_9.gml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 149984c

Please sign in to comment.