When i open my door i want the sound to be activated. But its not working its just silance
This is my script and i dont know if i have done something wrong
void OnStart()
{
AddUseItemCallback("", "keystudy_1", "Door_1", "KeyOnDoor", true);
AddUseItemCallback("", "key_study_1", "mansion_1", "KeyOnDoor2", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "MonsterCloset", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "rustningbort", true, 1);
SetEntityPlayerInteractCallback("note_letter_2", "spawn_func", true);
SetEntityPlayerInteractCallback("mansion_3", "Doorgris", true);
SetEntityPlayerInteractCallback("Door_1", "Ljud", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_1", false, false);
PlaySoundAtEntity("", "unlock_door", "Door_1", 0, false);
}
void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, false);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
}
void MonsterCloset(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("armour_nice_complete_1", true);
}
void rustningbort(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("armour_nice_complete_1", false);
}
void spawn_func(string &in item)
{
SetEntityActive("servant_grunt_1", true);
}
void Doorgris(string &in item)
{
SetEntityActive("pig_corpse_2", true);
}
void Ljud(string &in item)
{
SetEntityActive("Sound_2", true);
}
void OnLeave()
{
}
//___________________