Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Map music overwrites monster music
Saitoshiba Offline
Junior Member

Posts: 7
Threads: 2
Joined: Dec 2012
Reputation: 0
#1
Map music overwrites monster music

Hello, can anybody help me? It's been a week or more that I can't really find the answer to this problem, I play the music of the map and when the monster is activated his music simply won't play, he tries to find me while I am hiding and the map music keeps playing like nothing happened. Also, when I could play the music of the monster the main music didn't go back, I mean, didn't resume to where it was.

Don't know if will help but:


void OnStart()
{

AddEntityCollideCallback("Player","ScriptArea_7","FirstMusic",true,1); AddEntityCollideCallback("Player","ScriptArea_4","SecondMonster",true,1); SetEntityPlayerInteractCallback("note_generic_1","FirstMusic",true);

}

void OnEnter()
{
}

void OnLeave()
{
}

void FirstMusic(string &in asEntity)
{
PlayMusic("03_amb.ogg",true,1.0,0,3.0,false);
}

void SecondMonster(string &in parent, string &in child, int state)
{
GiveSanityDamage(10,true);
SetEntityActive("servant_grunt_1",true);
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_9",0,"Iddle"); AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_10",0,"Iddle"); AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_11",0,"Iddle"); AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_12",0,"Iddle");
AddEntityCollideCallback("servant_grunt_1","FadeSmoke","FadeSmoke",false,1);
}

//Deactivate the second monster

void FadeSmoke(string &in parent, string &in child, int state)
{
FadeEnemyToSmoke("servant_grunt_1",false);
}

The ScriptArea_7 is only a collision of the player when he comes back to this map.
(This post was last modified: 12-11-2012, 09:56 PM by Saitoshiba.)
12-05-2012, 02:24 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Map music overwrites monster music

When you activate the monster, just use the line: StopMusic(1, 3);

Trying is the first step to success.
12-05-2012, 07:47 AM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#3
RE: Map music overwrites monster music

Check if you're using the original grunt file and open the game.cfg (located in redist/config/) and look for
TerrorSound =
It should look like this:
TerrorSound = "ui_terror_meter.ogg"

[Image: 18694.png]
12-05-2012, 07:56 AM
Find
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#4
RE: Map music overwrites monster music

Your game music priority is too high, it is higher than the monsters music, and therefore you'll just hear the game music. If I remember right, I think the monsters music priority is 1.0. You are using the priority 3.0 on the game music, and will have to use <=1.0 if you do not want it to be heard when the monster spawns.

Change the bold and underline-marked number:

PlayMusic("03_amb.ogg",true,1.0,0,3.0,false);

If you want the music to resume to where it was, you'll have to change bool abResume to true, now it is set to false.
12-05-2012, 11:45 AM
Website Find
Saitoshiba Offline
Junior Member

Posts: 7
Threads: 2
Joined: Dec 2012
Reputation: 0
#5
RE: Map music overwrites monster music

Thanks guys. It really helped me. Thanks to everyone. Problem solved. I knew it was only a little mistake.
12-05-2012, 07:57 PM
Find




Users browsing this thread: 3 Guest(s)