P
PlsHelpMe
Guest
I am working on a galaga style game. The player has 3 lives and dies after getting hit 3 times, but i want it to play an audio when he dies. i cant figure out how to do this and ive been to, too many forums trying to find a way to solve my problem but i havent found anything (sorry for my sloppy writing im just really tired and ive been working on this game all day). ive tried using audio_play_sound and sound_play, ive tried making it play when obj_player is destroyed and when my global variable for hp = 0. i tried to copy a line of code that i used to show the health bar when the player is alive but then show game over when it died, but replaced the code with playing music when the player is alive but then playing the game over sound effect when it dies. when the player is alive it plays the music its suppose, but not when it dies.
(thx in advance for those that help)
also heres the code
if (global.dead == false)
{
audio_play_sound(snd_game, 10, true)
} else {
sound_play(snd_game_over);
}
when global.hp = 0 then global.dead happens
(thx in advance for those that help)
also heres the code
if (global.dead == false)
{
audio_play_sound(snd_game, 10, true)
} else {
sound_play(snd_game_over);
}
when global.hp = 0 then global.dead happens