(12-23-2010, 10:38 PM)Dark88 Wrote: (12-23-2010, 10:35 PM)bigfoot Wrote: (12-23-2010, 10:34 PM)Dark88 Wrote: For the sound issue I had this problem alot until after trial and error I seemed to get it to work using the function;
PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
for string &in asSoundFile I kept using the file name for the .ogg like this "break_wood_metal1.ogg" When really you want to play the .snt file there. In this case you'd put "break_wood_metal" and that's it.
If you only want to play the break_wood_metal1.ogg you can modify the .snt file and create a new one by deleting all the sound entries in the .snt in a text editor and leave only the one you want to play but you'll have to include it in a seperate folder for your release I believe.
Hope this helps with your playing sounds issue. ![Smile Smile](https://www.frictionalgames.com/forum/images/smilies/smile.gif)
Wow, I only understood you till "for string &in asSoundFile" lol :p, ah well.
I guess ill understand it eventually ^^ Thanks a lot man.!! ![Heart Heart](https://www.frictionalgames.com/forum/images/smilies/heart.gif)
LOL
Basically just put "break_wood_metal" for the soundfile you want played and you should be good to go.
Hehe (I edited my other post I didn't see your new post hehe)
but ontopic.
Ok so I just put break_wood_metal instead of my old path?,
Ok thats easy hehe and stupid lol.
anyway, I also actually want to know what all the parameters mean.
"PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);"
string& asSoundName - What does it do / mean?
string& asSoundFile - What does this do / mean?
string& asEntity - And this?
float afFade.. etc. etc.
EDIT2:
Ok I got the sound working when I just entered the map / level.
So how would I make it play when I interact with the door?.
"Let me try":
In the level editor at the door set the interact call back option to like : FirstLockedDoorScare.
then script:
void FirstLockedDoorScare(){
PlaySoundAtEntity(blabla)
}
?? hehe