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
Tape Recorder PlaySoundAtEntity - Solved
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Tape Recorder PlaySoundAtEntity

It's quite simple. Firstly, you'll need to separate your dialogue files into each chunk you want the subtitles to appear at individually (for example each sentence). After that, you'll just add the
AddEffectVoice(string& asVoiceFile, string& asEffectFile, string& asTextCat, string& asTextEntry,
bool abUsePosition, string& asPosEntity, float afMinDistance, float afMaxDistance);
script. Add one for each chunk you have.

For example like this:

void InteractCallback(string &in asEntity)
{
    AddEffectVoice("con01_01", "", "Dialogue", "Entry01_01",
true, asEntity, 5, 15);
    AddEffectVoice("con01_02", "", "Dialogue", "Entry01_02",
true, asEntity, 5, 15);
    AddEffectVoice("con01_03", "", "Dialogue", "Entry01_03",
true, asEntity, 5, 15);
}

The first parameter is the sound file, the fourth is the subtitle .lang entry. Otherwise it's up to you to change anything. Personally I'd use a for-loop to do this, but it would result in the exact same as what's above.

I do have a lengthy video which could explain things more if you're interested.
Spoiler below!




(This post was last modified: 02-14-2014, 09:27 AM by Mudbill.)
02-14-2014, 09:20 AM
Find


Messages In This Thread
RE: Tape Recorder PlaySoundAtEntity - by Mudbill - 02-14-2014, 09:20 AM



Users browsing this thread: 1 Guest(s)