Also you can add sound by using:
PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
-Where
string& asSoundName is name of a sound.(Can be left blank, unless you want it to loop, and later stop.
-
string& asSoundFile is sound file; the file you want to be played.
-
string& asEntity is entity you want it to be played.(For example "player" makes it play at player, but if you want the sound to be heard from elsewhere; let's say a piano called "piano1", you put that("piano1") there.
-
float afFadeTime is time it should fade, for example 1.0f would put 1 second fade time.
-
bool abSaveSound. I am not sure what this is
Just set it to false.
And you can stop it by using:
StopSound(string& asSoundName, float afFadeTime);
-Where
string& asSoundName is name of a sound(see above.)
-
float afFadeTime; fade time, see above.