Equil
Member
Posts: 94
Threads: 8
Joined: Sep 2010
Reputation:
0
|
RE: Scripting
Correct, except you need to designate the sound file to be played in the "PlaySoundAtEntity" function. I don't think "monster" is a valid file.
Try:
PlaySoundAtEntity("", "03_amb_idle.snt", "Player", 2.0, false);
I'll try explain the entire function.
PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound)
string& asSoundName - The name of the sound. This is optional, only really used if you want to call the function again later or something.
string& asSoundFile - The sound file to be used, I just browse through the sound in the editor to find what sounds I want to use, as it has a preview button which is handy.
string& asEntity - The entity the sound should be played at.
float afFadeTime - Self Explanatory, how long the sound takes to Fade in. Haven't played around with this much though.
bool abSaveSound - If you want the sound to be played later again, it really depends on the sound you're using for this one.
Hope this helps.
|
|
01-05-2011, 02:21 AM |
|