Frictional Games Forum (read-only)

Full Version: Sound isn't playing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The .hps file script :



void OnStart()
{
FadeOut(0.01);
AddTimer ("", 1, "Fade");
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i< 2;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
AddUseItemCallback("", "key_study_1", "metalsilent1", "CrowbarKeyOnDoor", true);
AddUseItemCallback("", "Pokeball_1", "mansion_4", "PokeballDoor", true);
}

void Fade(string &in asTimer)
{
AddTimer ("", 2, "Dream");
AddTimer ("", 0.1, "FadeIn");
}

void FadeIn(string &in asTimer)
{
FadeIn(2);
}

void Dream(string &in asTimer)
{
SetMessage("Messages", "JustDream", 0);
}

void CrowbarKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("metalsilent1", false, true);
PlaySoundAtEntity("", "unlock_door.ogg", "metalsilent1", 0, false);
GiveSanityBoost();
RemoveItem("key_study_1");
}

void PokeballDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_4", false, true);
PlayGuiSound("Picca.snt", 1.0f);
GiveSanityBoost();
RemoveItem("Pokeball_1");
}















////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{
}






And here's the .snt file script :



SOUNDENTITY
SOUNDS
Main
Sound File=Pica.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


I hope you can find the problem.
You made this thread very vague -_-

If that is the entire script for your .snt file, replace it with this:

Quote:<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="
Pica.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>
Your script says "picca" and your snt says "pica"
I tried both of your suggestion , but none of them actually worked :/
Never mind i got it to work i swapped the .snt file to the .ogg and it worked thanks a lot Big Grin!