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()
{
}
|