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
Script help!
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#12
RE: Script help!

The script you're looking for is:


PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);

asSoundName you can leave blank, it is used for later callbacks which I doubt you'll need
asSoundFile will be the name of the sound+.snt (for example, "mysound.snt")
asEntity will be the entity you play the sound at, which would be the statue.
afFadeTime is the time until the sound fades, but since the brick sound it so short, you can set it to 0.0f
abSaveSound tbh idk what it does, just mark it false xD

so altogether:

PlaySoundAtEntity("", "mysound.snt", "Statue_1", 0.0f, false);


May I also offer a simpler alternative, "PlayGuiSound".

PlayGuiSound plays the sound only at the player, but you can modify the volume; the Function is:

PlayGuiSound("mysound.snt", 1.0f);

mysound.snt = the sound to play
1.0f = the volume.

PlayGuiSound can make it seem like the statue is right behind/on the player, making it a bit more stressful for them Tongue

I rate it 3 memes.
06-12-2012, 05:07 PM
Find


Messages In This Thread
Script help! - by Clear - 06-10-2012, 10:09 AM
RE: Script help! - by SilentStriker - 06-10-2012, 10:23 AM
RE: Script help! - by Clear - 06-10-2012, 10:26 AM
RE: Script help! - by SilentStriker - 06-10-2012, 10:45 AM
RE: Script help! - by Clear - 06-10-2012, 04:01 PM
RE: Script help! - by SilentStriker - 06-10-2012, 04:13 PM
RE: Script help! - by FlawlessHappiness - 06-10-2012, 04:22 PM
RE: Script help! - by SilentStriker - 06-10-2012, 04:25 PM
RE: Script help! - by Clear - 06-12-2012, 04:02 PM
RE: Script help! - by CorinthianMerchant - 06-12-2012, 04:11 PM
RE: Script help! - by Clear - 06-12-2012, 05:00 PM
RE: Script help! - by CorinthianMerchant - 06-12-2012, 07:35 PM
RE: Script help! - by Adny - 06-12-2012, 05:07 PM



Users browsing this thread: 1 Guest(s)