Frictional Games Forum (read-only)
Manually Stopping Monster Music? - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Manually Stopping Monster Music? (/thread-9819.html)

Pages: 1 2


RE: Manually Stopping Monster Music? - Dizturbed - 08-17-2011

Delete some of the variable's in the model editor, and then save as =))


RE: Manually Stopping Monster Music? - Tanshaydar - 08-17-2011

(08-17-2011, 10:52 PM)palistov Wrote: Try this looping timer.

Code:
bool bMonsterActive = false;

void MonsterStuff(blahblah blahblah)
{
    SetEntityActive("grunty", true);
    PlayMusic("gruntymusic.ogg", true, 1, 0, 0, true);
    bMonsterActive = true;
    AddTimer("", 5, "MonsterCheck");
}

void MonsterCheck(string &in timer)
{
    bMonsterActive = GetEntityExists("grunty") ? true : false;
    if(!bMonsterActive) PlayMusic("newmusic.ogg", true, 1, 0, 0, 0, true);
    AddTimer("", 5, "MonsterCheck");
}

What I was thinking is something like that, but that requires to check whether monster seeing the player, or chasing the player. Requires more work, which I don't feel like doing lately.

Well, thanks for the help all!


RE: Manually Stopping Monster Music? - palistov - 08-17-2011

You can leave the attack and search music at its default. If you delete just the danger music field from the variables, then there will be no music playing when the monster is just active and patrolling. With that script the music will still play but just not be heard while the player is being chased or searched for, because there will be the attack music or hunt music being played. When the monster returns to its patrol the music should again be heard. And when you deactivate the monster it should go away.


RE: Manually Stopping Monster Music? - Tanshaydar - 08-18-2011

I guess there was something buggy, because if monster never sees player, when deactivated music stops playing. However, if monster ever sees player, no matter what I do default monster music kept playing.

I'm playing with entity settings, and in level there might be other things that might be causing conflicts. I'll test it, if it won't work, I'll come back to your script eventually.