02-18-2011, 08:59 AM
This was in the recollection thread:
Code:
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:
Code:
StopSound(string& asSoundName, float afFadeTime);
-Where string& asSoundName is name of a sound(see above.)
-float afFadeTime; fade time, see above.
But how would I actually input this into my script? ATM im putting it in as this : PlaySoundAtEntity(ramble, CH01_DanielRamble_01, door_1, 0, false);
I know this isnt correct, but I followed the above instructions and tried different variations to this, but the game doesnt even start, just comes up with a fatal error. Can someone help a noob please? lol
Code:
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:
Code:
StopSound(string& asSoundName, float afFadeTime);
-Where string& asSoundName is name of a sound(see above.)
-float afFadeTime; fade time, see above.
But how would I actually input this into my script? ATM im putting it in as this : PlaySoundAtEntity(ramble, CH01_DanielRamble_01, door_1, 0, false);
I know this isnt correct, but I followed the above instructions and tried different variations to this, but the game doesnt even start, just comes up with a fatal error. Can someone help a noob please? lol