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
Voices
irockpeople1 Offline
Junior Member

Posts: 9
Threads: 3
Joined: Jan 2012
Reputation: 0
#1
Voices

Hello. I am trying to get a voice to play when i walk past a certin point, but the voice is not working and I don't know what is wrong.
I have this in my hps file:

AddEntityCollideCallback("Player", "Harry_Speak", "Harry", true, 1);

void Harry(string &in asParent, string &in asChild, int alState)
{
AddEffectVoice("1_H", "", "flashbacks", "Wine_Storage", false, "", 0, 0);
AddTimer("", 5, "Harry2");
}

Please help!
(This post was last modified: 01-26-2012, 10:32 PM by irockpeople1.)
01-26-2012, 10:30 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Voices

PlaySoundAtEntity("", "nameofsound.snt", "Player", 0, false); would be easier than addeffectvoice.

01-27-2012, 09:21 AM
Find
irockpeople1 Offline
Junior Member

Posts: 9
Threads: 3
Joined: Jan 2012
Reputation: 0
#3
RE: Voices

(01-27-2012, 09:21 AM)flamez3 Wrote: PlaySoundAtEntity("", "nameofsound.snt", "Player", 0, false); would be easier than addeffectvoice.

ok, but how would i make a .snt file?
01-27-2012, 12:41 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Voices

Make a notepad and rename it to the same as the .ogg sound. (Not with the .ogg) and then open and add this text into there:


Quote:<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="nameofsound.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="12" MaxDistance="50" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.7" Priority="0" />
</SOUNDENTITY>
Rename the bolded part to the name of the sound. Once that is done rename the file extension from a .txt to a .snt

(This post was last modified: 01-27-2012, 12:46 PM by flamez3.)
01-27-2012, 12:45 PM
Find
irockpeople1 Offline
Junior Member

Posts: 9
Threads: 3
Joined: Jan 2012
Reputation: 0
#5
RE: Voices

(01-27-2012, 12:45 PM)flamez3 Wrote: Make a notepad and rename it to the same as the .ogg sound. (Not with the .ogg) and then open and add this text into there:


Quote:<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="nameofsound.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="12" MaxDistance="50" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.7" Priority="0" />
</SOUNDENTITY>
Rename the bolded part to the name of the sound. Once that is done rename the file extension from a .txt to a .snt

Thank you so much! The voice now works when I trigger the area Big Grin
Now i am having problums with linking the sounds together.

void Voice(string &in asParent, string &in asChild, int alState)
{
StopMusic(3, 0);
GiveSanityDamage(5.0f, true);
PlaySoundAtEntity("", "1_H.snt", "Player", 0, false);
StartPlayerLookAt("Wine_Storage", 2, 2, "");
SetPlayerMoveSpeedMul(0);
SetPlayerJumpDisabled(true);
AddTimer("", 5, "Talk");
}
void Talk(string &in asTimer)
{
GiveSanityDamage(1.0f, true);
PlaySoundAtEntity("", "2_H.snt", "Player", 0, false);
AddTimer("", 5, "Talkk");
}
void Talkk(string &in asTimer)
{
GiveSanityDamage(1.0f, true);
PlaySoundAtEntity("", "3_H.snt", "Player", 0, false);
AddTimer("", 5, "Voice_4");
}

the give Sanity damage of 1 is to tell me when the timers go off. They go off, but the sounds don't play.
(This post was last modified: 01-28-2012, 02:00 PM by irockpeople1.)
01-28-2012, 01:21 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
RE: Voices

Where are the sounds located?

01-29-2012, 03:19 AM
Find
irockpeople1 Offline
Junior Member

Posts: 9
Threads: 3
Joined: Jan 2012
Reputation: 0
#7
RE: Voices

/lang/eng/voices/flashbacks
01-29-2012, 06:16 PM
Find




Users browsing this thread: 3 Guest(s)