Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom sounds?...
Author Message
Camtasia Offline
Junior Member

Posts: 1
Joined: Jun 2012
Reputation: 0
Post: #1
Custom sounds?...
Im trying to add custom sounds to the custom story, but the sound doesnt play

this is the script that plays the sound
void MonsterScare(string &in asParent, string &in asChild, int alState){    SetEntityActive("gisse3", true);    PlayGuiSound("scaresound.ogg", 100);    AddTimer("StopMusic", 1, "StopMusic2");}

I made a sounds folder and a extrasounds inside there again there i put the sound and made a Snt file

snt file
<SOUNDENTITY> <SOUNDS>    <Main>      <Sound File="scaresound.ogg" />       </Main>   </SOUNDS>   <PROPERTIES Volume="5" MinDistance="1" MaxDistance="50" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="false" Blockable="False" BlockVolumeMul="0.7" Priority="5" /></SOUNDENTITY>
06-11-2012 05:36 AM
Find all posts by this user Quote this message in a reply
Putkimato Offline
Junior Member

Posts: 25
Joined: Jun 2012
Reputation: 0
Post: #2
RE: Custom sounds?...
http://www.frictionalgames.com/forum/thread-7395.html

youre welcome
06-11-2012 10:18 AM
Find all posts by this user Quote this message in a reply
Ermu Offline
Member

Posts: 89
Joined: Jan 2012
Reputation: 2
Post: #3
RE: Custom sounds?...
For music, use
PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);


Plays music.
asMusicFile - the music to play + extension .ogg
abLoop - determines whether a music track should loop
afVolume - volume of the music
afFadeTime - time in seconds until music reaches full volume
alPrio - priority of the music. Note that only the music with the highest priority can be heard! 0 - highest, 1 - lower, etc


[font=monospace, serif]And for normal sounds use[/font]
[font=monospace, serif]PlaySoundAtEntity([/font]string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
asSoundName - internal name
asSoundFile - the sound to use + extension .snt
asEntity - the entity to create the sound at, can be “Player”
afFadeTime - time in seconds the sound needs to fade
abSaveSound - determines whether a sound should “remember” its state. If true, the sound is never attached to the entity! Also note that saving should on be used on looping sounds!

ALSO
in the .snt of yours, remove the .ogg from the "Sound File"
AND when you use the sound in a script, use .snt instead, example
PlaySoundAtEntity("", "scaresound.snt", "Player", 0, false);

Plague Forest - Unreleased, currently on hold.
(This post was last modified: 06-11-2012 10:29 AM by Ermu.)
06-11-2012 10:29 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)