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


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

I think topic name pretty much explains everything. Is it possible to manually stop monster music? Chasing, patrolling etc...

I saw the prio of the monster music is 0, so StopMusic(0,0); would work I think, but it didn't. Anything else aside from deleting the music for monster?


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

You mean the file ui_terror_meter? Instead of deleting it(I hate this thing so I wouldn't have a problem doing that) have you tried changing the entity variables? There must be there...

You want it disabled always or just for a monster or a place?


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

The thing is that once he messes around with the file it won't work in any situation.


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

Not the ui_terror_meter, everything. Once monster becomes active, or when monsters chase you, when monster is patrolling; all of those sounds. Is there a way? Because it is a music playing in background, and its prio is 0.


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

The enemy music prio is only used when there are multiple active monsters. You can create a custom entity file for your monster and remove the danger music file (means he's active). Then you can script your music to play when the monster becomes active and stop it whenever you wish Smile


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

I should change the music when he sees the player, when he chases the player etc...
I think I'll just skip it.

The problem is, when enemy gets deactivated, its music continues to play...


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

I know jens mentioned there are ways to access things inside of an entity; I think you remember this thread:

http://www.frictionalgames.com/forum/thread-8227-post-72361.html#pid72361

So maybe it's possible?


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

Do you want to completely remove the enemy sounds just for one enemy or all of them? I mean, do you want to make then silent when chasing? All of them?


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

I want the default entity as it is.
Music must play while chasing, while patrolling. However, when I deactivate the entity, or Fade it into smoke, whatever, that enemy music continues to play.


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

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");
}