Frictional Games Forum (read-only)
Problem with lurker Music [SOLVED] - 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: Problem with lurker Music [SOLVED] (/thread-6701.html)



Problem with lurker Music [SOLVED] - Linus Ågren - 02-24-2011

Well, is it possible to make so that when you get out of the water and the lurker stops chasing you, the music won't stop and revert to the original one. I tried a PlayMusic script but that makes the music first stop and then restart, and that sounds really bad.

Edit: I noticed they had in game that the music stops and reverts back to the normal one. Nvm!


RE: Problem with lurker Music - Selyp - 02-24-2011

(02-24-2011, 02:12 PM)junkfood2121 Wrote: Well, is it possible to make so that when you get out of the water and the lurker stops chasing you, the music won't stop and revert to the original one. I tried a PlayMusic script but that makes the music first stop and then restart, and that sounds really bad.

Maybe make a script area encompassing the whole area (water and land) and make it play that music while you are in it?


RE: Problem with lurker Music - Linus Ågren - 02-24-2011

I'm still relatively new to scripting, how do you make an area where the music only plays if ur in it?


RE: Problem with lurker Music - Selyp - 02-25-2011

(02-24-2011, 08:56 PM)junkfood2121 Wrote: I'm still relatively new to scripting, how do you make an area where the music only plays if ur in it?

Make a Script Area in the level editor, then in your .hps file you would add an EntityCollideCallback making it play the music when the player is in the area. Something like

OnEnter()
{
AddEntityCollideCallback("Player", "name_of_script_area", "name_of_function_", true, 1);
}

Then your function would be

void Name_of_Function (string &in asParent, string &in asChild, int alState)
{
PlayMusic("Name_of_music_file", true, 1, 1, 1, true);
}

That probably won't work exactly as intended, but it should give you a solid basis to work off of.


RE: Problem with lurker Music - Linus Ågren - 02-25-2011

Unfortunately, this just does as above. It resets the music, making it stop and then start again =/


RE: Problem with lurker Music - Nye - 02-25-2011

(02-25-2011, 01:32 AM)junkfood2121 Wrote: Unfortunately, this just does as above. It resets the music, making it stop and then start again =/

I know it sounds harsh; but you could just have a look at what the devs did in their script file. Tongue


RE: Problem with lurker Music - Linus Ågren - 02-25-2011

I have, but I don't see they do anything other than placing the lurker there. In their script I see none of the music played when being chased by lurker (att_guardian.ogg or something like that). o.O