Frictional Games Forum (read-only)

Full Version: Brute music to stop
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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
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
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
ok sweet thx ill try the music one
Hmm that sounds more like a bug in your game.