[Unity3d Tutorial] Stop level music and play death music when player dies

[Unity3d Tutorial] Stop level music and play death music when player dies

TheSenpaiCode

6 лет назад

7,941 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@Shiro-mn3bb
@Shiro-mn3bb - 13.11.2018 01:53

What if I want to change the audio that's playing when a certain monster or boss dies instead of the player?

Ответить
@mertkorkmaz8726
@mertkorkmaz8726 - 26.04.2019 20:02

my musics starts at the same time. what could be the problem ? also my music wont stop when my character is dead.

Ответить
@mahamed100100
@mahamed100100 - 18.06.2019 22:42

can u plz write the script in the comment because my script doesn't work

Ответить
@veshramroop5039
@veshramroop5039 - 24.10.2019 18:34

I tried this method to play a sound when it's game over, and it's not working. Can you help me out?

Ответить
@hessler50
@hessler50 - 26.08.2020 00:16

work thx

Ответить
@chrismaister721
@chrismaister721 - 01.11.2020 00:08

Hi there,

Many thanks for the video. I have followed all your steps, making sure that everything you showed on your video matches my settings/script, and for some weird reason once the player is dying the "GameOver" music won't play. Instead, the "LevelMusic" would keep playing. Any thoughts?

PS: DeathSong is not clicked as a play on awake. It is the correct audio. True/False in the script are both correct.

Ответить
@ameerah8716
@ameerah8716 - 12.11.2021 18:02

لا تستمر

Ответить
@kevinrakaGameDev
@kevinrakaGameDev - 17.02.2022 11:00

best

Ответить
@franciscoalvarado7056
@franciscoalvarado7056 - 06.06.2022 23:30

i had the following issue: the level music that i put in the "first" audiosource played correctly, but when my player died, or when i got "defeat" , the level music stop but the "defeat" music (second audio source) didn't start play, the code was correct because the booleans switched right, also i tested it with a debug log. But i don't know why the second audio source was't working, well, in short, i fixed it only deleting the second audio source (defeat song) from hierarchy and creating it again, and putting it on the script in inspector

Ответить
@zaimamukhtar6633
@zaimamukhtar6633 - 25.05.2023 11:11

I've been searching all over internet for this thing and Thankfully...

Ответить