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
My sound won't play.
Wapez Offline
Senior Member

Posts: 360
Threads: 37
Joined: Mar 2012
Reputation: 19
#1
My sound won't play.

Hey guys, i'm making a custom story and I have a problem... A sound won't play. Does anyone find a problem in my script?



void OnStart()
{
PreloadSound("doorbell.snt");
SetEntityPlayerInteractCallback("doorbell", "doorbellsound", true);
SetEntityPlayerLookAtCallback("sign", "signtext", false);
}

void doorbellsound(string &in item)
{
PlaySoundAtEntity("", "doorbell.snt", "doorbell", 0, false);
PlaySoundAtEntity("", "scare_steps_big.snt", "door1", 0, false);
AddTimer("dingdong", 6, "bobishere");
AddTimer("explode", 8, "explodedoor");
}

void bobishere(string &in asTimer)
{
SetEntityActive("servant_grunt_2", true);
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_3", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_4", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_5", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_6", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_2", "PathNodeArea_7", 0, "Idle");
PlaySoundAtEntity("", "amb_alert.snt", "door1", 0, false);
}

void explodedoor(string &in asTimer)
{
SetPropHealth("door1", 0.0f);
StartScreenShake(0.08f, 1.5, 0.5, 1.0);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0, false);
PlaySoundAtEntity("", "sanity_damage.snt", "Player", 0, false);
PlaySoundAtEntity("", "hurt_pant.snt", "Player", 0, false);
GiveSanityDamage(10, true);
}

void OnEnter()
{
}

void OnLeave()
{
}

Founder & Legally Accountable Publisher of Red Line Games.
Environment & Gameplay Designer and Scripter.
http://moddb.com/mods/in-lucys-eyes
05-18-2012, 02:18 AM
Find
Xanthos Offline
Senior Member

Posts: 318
Threads: 9
Joined: Mar 2012
Reputation: 8
#2
RE: My sound won't play.

You got yourself a .snt file set up, Correct?

05-18-2012, 02:31 AM
Find
Wapez Offline
Senior Member

Posts: 360
Threads: 37
Joined: Mar 2012
Reputation: 19
#3
RE: My sound won't play.

(05-18-2012, 02:31 AM)Xanthos Wrote: You got yourself a .snt file set up, Correct?
I think so, here it is. Also i have the doorbell.ogg in the same folder.


<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="doorbell" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="0.5" MaxDistance="12" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.5" Priority="0" />
</SOUNDENTITY>

Founder & Legally Accountable Publisher of Red Line Games.
Environment & Gameplay Designer and Scripter.
http://moddb.com/mods/in-lucys-eyes
05-18-2012, 09:06 AM
Find
Sazureth Offline
Junior Member

Posts: 20
Threads: 8
Joined: Jan 2012
Reputation: 0
#4
RE: My sound won't play.

I might have the same problem.

Yours could be caused by your custom map trying to use sounds from the vanilla game folder, not the folder of your custom story. At least I'm unable to use modified .snt files from the story folder.

Do you know is there any way to assign the folder for used sounds?
05-18-2012, 02:14 PM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#5
RE: My sound won't play.

As a precaution, you could change "doorbell" to "doorbell.ogg" in your .snt file. If you only have 1 doorbell.ogg, you can set Random to 0.

Is there already a doorbell sample in Amnesia? If so, you should be renaming your doorbell.snt and doorbell.ogg to be unique (doorbell2.snt doorbell2.ogg, etc.).

Dark Seclusion Here
05-18-2012, 08:55 PM
Find




Users browsing this thread: 1 Guest(s)