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
Custom Sound...
rallelol Offline
Member

Posts: 53
Threads: 11
Joined: Dec 2011
Reputation: 1
#1
Custom Sound...

Hello, i've created my own custom sound and put it in a "sounds"-folder for my customstory. It is put where it should be but i can't get it to work.
I have both the .oggfile and the .snt-text

Sntfile looks like this:

<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="fuck_off.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="0.9" MinDistance="1" MaxDistance="10" Random="" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.7" Priority="0" />
</SOUNDENTITY>

And the script looks like this:

void OnStart()
{
AddEntityCollideCallback("grunt3", "gruntsayarea1", "MonsterFunc4", true, 0);
}

void MonsterFunc4 (string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "fuck_off.snt", "grunt3", 0, false);
}

I've tried with "fuck_off.ogg" aswell.
The .ogg-file works fine. I don't know what i'm doing wrong, i'm getting angry at this...

Can someone help me please?


(This post was last modified: 01-12-2012, 05:07 PM by rallelol.)
01-10-2012, 08:00 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#2
RE: Custom Sound...

<Sound File="fuck_off.ogg" />

- remove the .ogg from the end and it should work.

The Interrogation
Chapter 1

My tutorials
(This post was last modified: 01-10-2012, 08:19 PM by Elven.)
01-10-2012, 08:19 PM
Find
rallelol Offline
Member

Posts: 53
Threads: 11
Joined: Dec 2011
Reputation: 1
#3
RE: Custom Sound...

(01-10-2012, 08:19 PM)Elven Wrote: <Sound File="fuck_off.ogg" />

- remove the .ogg from the end and it should work.
It did not, unfortunately. I can be the one who have done this very wrong. But basically you create an .oggfile and then you do all this and put it in a soundsmap in your customstory folder? Or what on earth am i doing wrong?

01-10-2012, 08:32 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#4
RE: Custom Sound...

If you want to include with custom story it must be in

custom_stories/yourCustomStoryName/sounds

These are one of my custom sound snt file settings, maybe that helps:

PHP Code: (Select All)
<SOUNDENTITY>
  <
SOUNDS>
      <
Main>
          <
Sound File="01deathtalk1" />
      </
Main>
  </
SOUNDS>
  <
PROPERTIES Volume="1.0" MinDistance="2" MaxDistance="16" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.8" Priority="0" />
</
SOUNDENTITY

The Interrogation
Chapter 1

My tutorials
01-10-2012, 08:38 PM
Find
rallelol Offline
Member

Posts: 53
Threads: 11
Joined: Dec 2011
Reputation: 1
#5
RE: Custom Sound...

(01-10-2012, 08:38 PM)Elven Wrote: If you want to include with custom story it must be in

custom_stories/yourCustomStoryName/sounds

These are one of my custom sound snt file settings, maybe that helps:

PHP Code: (Select All)
<SOUNDENTITY>
  <
SOUNDS>
      <
Main>
          <
Sound File="01deathtalk1" />
      </
Main>
  </
SOUNDS>
  <
PROPERTIES Volume="1.0" MinDistance="2" MaxDistance="16" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.8" Priority="0" />
</
SOUNDENTITY
Thank you for that! Smile

And how would you work out a script where the player walks into a script-area and the sounds starts playing? If i'm not asking too much Smile

01-10-2012, 08:41 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#6
RE: Custom Sound...

Hmm, if it is fresh map, etc, then something like this:

PHP Code: (Select All)
void OnStart(){    AddEntityCollideCallback("Player""ScriptArea""SoundEffect"true0);}
void SoundEffect (string &in asParentstring &in asChildint alState) {PlaySoundAtEntity("SoundName""MySoundFileName""PlayItHere"0false);} 

The Interrogation
Chapter 1

My tutorials
01-10-2012, 08:47 PM
Find
rallelol Offline
Member

Posts: 53
Threads: 11
Joined: Dec 2011
Reputation: 1
#7
RE: Custom Sound...

(01-10-2012, 08:47 PM)Elven Wrote: Hmm, if it is fresh map, etc, then something like this:

PHP Code: (Select All)
void OnStart(){    AddEntityCollideCallback("Player""ScriptArea""SoundEffect"true0);}
void SoundEffect (string &in asParentstring &in asChildint alState) {PlaySoundAtEntity("SoundName""MySoundFileName""PlayItHere"0false);} 
I'm Sorry, that didn't work either... I Have absolutely no idea why it's not. Isn't there a video out there that explains it?

01-10-2012, 08:55 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#8
RE: Custom Sound...

That means are you sure that your files are in right place?

The Interrogation
Chapter 1

My tutorials
01-10-2012, 09:00 PM
Find
rallelol Offline
Member

Posts: 53
Threads: 11
Joined: Dec 2011
Reputation: 1
#9
RE: Custom Sound...

(01-10-2012, 09:00 PM)Elven Wrote: That means are you sure that your files are in right place?
I'm not sure of anything...

The files are put in redist -> custom_stories -> the name of my customstory -> sounds

And in that map there's fuck_off.ogg and fuck_off.snt, isn't that it?

01-10-2012, 09:02 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#10
RE: Custom Sound...

Try to put these 2 into your main sound folder for now (just for test), you can create into your main sounds file new folder like "my shit" and put those 2 there, test if it works then.

I am not sure neither what might be case, but I remember someone had this problem before too. I personally have also the steam version of game, so thats also the difference.

The Interrogation
Chapter 1

My tutorials
01-10-2012, 09:18 PM
Find




Users browsing this thread: 1 Guest(s)