Frictional Games Forum (read-only)

Full Version: Manually Stopping Monster Music?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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?
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?
The thing is that once he messes around with the file it won't work in any situation.
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.
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
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...
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/thr...l#pid72361

So maybe it's possible?
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?
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.
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");
}
Pages: 1 2