Frictional Games Forum (read-only)
Music Stops After Death - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Music Stops After Death (/thread-6903.html)



Music Stops After Death - Anxt - 03-15-2011

So, when testing my custom story I discovered that upon death, the music I had set to play in the map would stop playing until the player leaves the map and comes back. Anyone know why this might be? I have it set to resume, however I only have PlayMusic set inside OnEnter. Music also stops playing upon loading a saved game, but only in some maps. Any help with this problem would be greatly appreciated, and thanks in advance Smile


RE: Music Stops After Death - Viperdream - 03-16-2011

Put it in OnStart


RE: Music Stops After Death - Anxt - 03-16-2011

Ah. Thanks Smile


RE: Music Stops After Death - theDARKW0LF - 03-16-2011

Interesting that OnStart would fix, since I've always had my music in OnStart, yet if I die, it doesn't start up again and it is set to repeat/loop.


RE: Music Stops After Death - Anxt - 03-16-2011

Actually I haven't died since then, so I'm not sure if it works or not. I was still trying to work out the rest of the bugs in the coding, but still managed to live every time. The odd thing is, though, it works on a map where the music starts after a certain function is called, but not on the maps where I have the music within either the OnStart or OnEnter. Also, I noticed that putting it in OnStart makes it fail to resume after leaving and coming back, so there should be a better solution.


RE: Music Stops After Death - Tanshaydar - 03-16-2011

OnEnter?
Everytime you enter.


RE: Music Stops After Death - Viperdream - 03-16-2011

If you have checkpoints, you could enter the PlayMusic script at the void of the checkpoint.

If you can die in a map, then you should also have some checkpoints.