Frictional Games Forum (read-only)
Monster Play Sound After PathNode!!!! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Monster Play Sound After PathNode!!!! (/thread-20322.html)

Pages: 1 2 3


RE: Monster Play Sound After PathNode!!!! - VeNoMzTeamHysterical - 02-14-2013

(02-14-2013, 05:05 PM)BeeKayK Wrote: oh, ok....

Ah i see it!

(string &in Entity) These parameters are for interacting, not for colliding.



(string &in asParent, string &in asChild, int alState) is the correct one.


Maybe this will help (Sorry for selfpromotion) http://www.frictionalgames.com/forum/thread-18368.html

I did change it but still its not working daf*ck.....


RE: Monster Play Sound After PathNode!!!! - FlawlessHappiness - 02-14-2013

Please show me your script

Impossible to handle something you cannot see Wink


RE: Monster Play Sound After PathNode!!!! - VeNoMzTeamHysterical - 02-14-2013

(02-14-2013, 05:25 PM)BeeKayK Wrote: Please show me your script

Impossible to handle something you cannot see Wink


monster name: monsterscene1
script area name: RocksSound


void OnStart()

{
AddEntityCollideCallback("Player", "Text1", "Text1", true, 1);
SetEntityPlayerInteractCallback("DungeonKey", "Scene1", true);
AddEntityCollideCallback("Player", "SoundScene1", "SoundScene1", true, 1);
AddEntityCollideCallback("monsterscene1", "RocksSound", "RocksFunc", true, 1);

}

void Text1(string &in asParent, string &in asChild, int alState)

{
SetMessage("Messages", "Message1", 1);
}

void SoundScene1 (string &in asParent, string &in asChild, int alState)

{
PlayMusic ("02_amb_safe.ogg", true, 1.0, 2, 1, true);
}

void RocksFunc (string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("monsterscene1", "break_wood1.snt", "RocksSound", 0, false);
}


RE: Monster Play Sound After PathNode!!!! - NaxEla - 02-14-2013

I might be wrong here, but I don't think there is a break_wood1.snt. I'm pretty sure there is only break_wood.snt, and then the .ogg files are called break_wood1.ogg, break_wood2.ogg, etc. The .snt file randomly picks one if the break_wood .ogg files to play.


RE: Monster Play Sound After PathNode!!!! - VeNoMzTeamHysterical - 02-14-2013

(02-14-2013, 05:42 PM)NaxEla Wrote: I might be wrong here, but I don't think there is a break_wood1.snt. I'm pretty sure there is only break_wood.snt, and then the .ogg files are called break_wood1.ogg, break_wood2.ogg, etc. The .snt file randomly picks one if the break_wood .ogg files to play.

i think thats the problem then i gonna check oke Big Grin

(02-14-2013, 05:42 PM)NaxEla Wrote: I might be wrong here, but I don't think there is a break_wood1.snt. I'm pretty sure there is only break_wood.snt, and then the .ogg files are called break_wood1.ogg, break_wood2.ogg, etc. The .snt file randomly picks one if the break_wood .ogg files to play.

Still not working it just does not trigger if the monster walks into that area

I gonna check if it works as player.

Well still does not work..... if anyone knows an tutorial of it or can make one....

That an monster hits an area and triggers an function that would be great!


RE: Monster Play Sound After PathNode!!!! - FlawlessHappiness - 02-14-2013

Have you tried putting something in the function to see if it even triggers?


RE: Monster Play Sound After PathNode!!!! - Your Computer - 02-14-2013

In the debug menu check the option to list the sounds playing, and when the monster collides with the area, see if the sound gets listed on the upper left corner of the screen.


RE: Monster Play Sound After PathNode!!!! - VeNoMzTeamHysterical - 02-14-2013

(02-14-2013, 07:18 PM)Your Computer Wrote: In the debug menu check the option to list the sounds playing, and when the monster collides with the area, see if the sound gets listed on the upper left corner of the screen.

No it says it does not play the sound so it does not triggers..

Here is the map and HPS file...

check if you can find something that i did wrong..

http://www.mediafire.com/?ba1a5xycwdqvdp8


RE: Monster Play Sound After PathNode!!!! - NaxEla - 02-14-2013

I would double check the names are correct in your script for the entities and the sound.


RE: Monster Play Sound After PathNode!!!! - darksky - 02-14-2013

if you use playSoundAtEntity you have to use a .snt file, not a .ogg file

Code:
void RocksFunc (string &in asParent, string &in asChild, int alState)
{
    PlaySoundAtEntity("", "break_wood.snt", "RocksSound", 0, false);
}