The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Script Help Activate sound when open door!
Bramme Offline
Junior Member

Posts: 13
Threads: 5
Joined: Jan 2012
Reputation: 0
#1
Activate sound when open door!

When i open my door i want the sound to be activated. But its not working its just silanceSad
This is my script and i dont know if i have done something wrongConfused

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

}




//___________________
01-06-2012, 11:49 PM
Find


Messages In This Thread
Activate sound when open door! - by Bramme - 01-06-2012, 11:49 PM
RE: Activate sound when open door! - by Krymtel - 01-07-2012, 12:36 AM



Users browsing this thread: 1 Guest(s)