Frictional Games Forum (read-only)

Full Version: Sounds and monster
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey there,

I need help with some sounds and a monster.
Sounds:

On two parts of my map I need to play a sound.
First time:
void Break(string &in asParent, string &in asChild, int alState)
{
FadeInSound("break_wood_metal2.snt", 0, true);
GiveSanityDamage(5.0f, true);
SetEntityActive("enemy", true);
SetEntityActive("prison_section_3", false);
SetEntityActive("prison_section_5", true);
AddEnemyPatrolNode("enemy", "PathNodeArea_100", 0.001, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_101", 0.001, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_102", 0.001, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_103", 2, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_104", 0.001, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_105", 0.001, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_106", 0.001, "Idle");
}

I dont know if there I must write something else and not fade in...
Ingame no sound is coming.
And here is the problem with the enemy:
It becomes active, but it dont follows the path nodes.

Same prob. with the sound here:

void killall(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5.0f, true);
FadeInSound("20_event_darkness.snt", 0, true);
}

I think fade in sound is wrong, but i dont know what to do.

Thx for reading
I would maybe try PlaySoundAtEntity or set fade in time to 0.001 . Because maybe the fadein needs a fade in time or something.
thx for answer, but it dont works Sad
break_wood_metal2.snt and 20_event_darkness.snt don't actually exist. Both those files have a .ogg extension. And also, as tonitoni1998 said, it's better to use PlaySoundAtEntity for playing sounds.

So for the sound, you would write:
PHP Code:
PlaySoundAtEntity("""break_wood_metal.snt""Player"0false); //"Player" is the entity it's played at 

For the event music, use PlayMusic:
PHP Code:
PlayMusic("20_event_darkness"false1010false); 
thx very much.
the sound event_darkness works now.
still i dont hear the other one, and the monster isnt following too.

edit:
ah, i now solved the problem with the monster, it saw me through a wall...
(03-14-2013, 10:24 PM)Knusper. Wrote: [ -> ]thx very much.
the sound event_darkness works now.
still i dont hear the other one, and the monster isnt following too.

edit:
ah, i now solved the problem with the monster, it saw me through a wall...

Hi. In the level edit or you can uncheck something at the monster entity so he won't react and start chasing you. So that you can inspect your map without worrying about being murdered....
i said the monster problem is solved.
still the sound dont works
strangely the monster doesn't work anymore and the sound isn't there, too.
I tried very much but it don't work.

Maybe you could try it, here is the map folder:
http://speedy.sh/UdJdV/tests.zip


I really can't find the mistake.

I need:
playing the sound at the area it should load and the monster should go like the path nodes show.
which monster?? there are like 100...

enemy_suitor_5 right?

I have the answer dude.
PHP Code:
void follow(string &in asParentstring &in asChildint alState){    
SetEntityActive("enemy_suitor_5"true);    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_100"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_101"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_102"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_103"2"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_104"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_105"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_106"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_110"0.001"Idle");} 


You wrote servant_brute_5. It's the enemy_suitor_5. Wink
now it works, thx.
BUT the sound still doesnt work.
Pages: 1 2