Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#4
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
Find


Messages In This Thread
Scripting - by Russ Money - 01-04-2011, 01:34 PM
RE: Scripting - by Equil - 01-04-2011, 06:04 PM
RE: Scripting - by Russ Money - 01-05-2011, 01:21 AM
RE: Scripting - by Equil - 01-05-2011, 02:21 AM
RE: Scripting - by Russ Money - 01-05-2011, 02:48 AM
RE: Scripting - by Equil - 01-05-2011, 03:17 AM



Users browsing this thread: 1 Guest(s)