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
Brute music to stop
Josh9810 Offline
Junior Member

Posts: 34
Threads: 9
Joined: Oct 2012
Reputation: 0
#1
Brute music to stop

Is there a way to stop the brute search music?


I have this part where you teleport to an area on top of a giant bed full of chairs, you hide behind chairs to go through a door and teleport somewhere else away. If he sees you he chases you of course and if you make it through the door with him chasing you the script says he disappears but the search music keeps playing?

Is there a function which can stop it from playing or do I have to go and change the models properties?

Also how do I add my own sound to it I have it in ogg and snt and I cant seem to get it to work?
(This post was last modified: 11-23-2012, 09:16 AM by Josh9810.)
11-23-2012, 08:43 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Brute music to stop

You can do it, by playing some other music with a priority of 10.
Or, you can edit the monster in the model editor, and save it as a custom entity

Trying is the first step to success.
11-23-2012, 09:18 AM
Find
Josh9810 Offline
Junior Member

Posts: 34
Threads: 9
Joined: Oct 2012
Reputation: 0
#3
RE: Brute music to stop

Ok that will probably work but I want a custom sound playing and I dont know how to make one. I transferred the MP3 sound to OGG format and made an SNT file for it.


<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="Music_custom_01.Ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="0.1" MaxDistance="50" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.5" Priority="0" />
</SOUNDENTITY>

Then the script for the part when it plays.
void Onstart()
{
ya da da... (other collide callbacks)

AddEntityCollideCallback("cellar_grunt", "Music_stop", "no_more_FAG", true, 1);
AddEntityCollideCallback("cellar_grunt", "grunt_disappear_ready", "no_more_FAG_ready", true, 1);
}

void no_more_FAG_ready(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Music_stop", true);
}
void no_more_FAG(string &in asParent, string &in asChild, int alState)
{
StopSound("Music_custom_01.OGG", 1);
}
void rawr_sound(string &in asParent, string &in asChild, int alState)
{
PlayMusic("Music_custom_01.ogg", true, 1, 1, 0, true);
}_________________________________________________________
I dont know if this affects it


void rawr(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("cellar_grunt", true);
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_1", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_2", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_3", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_4", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_5", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_6", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_7", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_8", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_9", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_10", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_11", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_12", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_13", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_14", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_15", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_16", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_17", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_18", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_19", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_20", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_21", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_22", 0.1, "");
AddEnemyPatrolNode("cellar_grunt", "PathNodeArea_23", 0.1, "");
SetEntityActive("NO", true);
}
____________________________________________________________

There... is something wrong
11-26-2012, 05:29 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: Brute music to stop

PlayMusic("Music_custom_01.ogg", true, 1, 1, 0, true);
This is what plays the music


StopMusic(1, 1); This will stop the music.


When you are using music you don't need .snt files.


Then you can just use the callbacks, PlayMusic and StopMusic, instead of PlaySoundAtEntity, and StopSound Wink


But in this case you know, i would go edit the monster so the search, hunt and notice music is your custom .ogg file

Trying is the first step to success.
11-26-2012, 06:52 AM
Find
Josh9810 Offline
Junior Member

Posts: 34
Threads: 9
Joined: Oct 2012
Reputation: 0
#5
RE: Brute music to stop

ok sweet thx ill try the music one
11-26-2012, 07:00 AM
Find
ferryadams10 Offline
Senior Member

Posts: 288
Threads: 40
Joined: Apr 2011
Reputation: 19
#6
RE: Brute music to stop

Hmm that sounds more like a bug in your game.

Got a nice sofa
Please come and have a seat for a while

11-26-2012, 09:25 AM
Find




Users browsing this thread: 1 Guest(s)