Frictional Games Forum (read-only)

Full Version: Monster Play Sound After PathNode!!!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(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.....
Please show me your script

Impossible to handle something you cannot see Wink
(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);
}
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.
(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!
Have you tried putting something in the function to see if it even triggers?
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.
(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
I would double check the names are correct in your script for the entities and the sound.
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);
}
Pages: 1 2 3