Frictional Games Forum (read-only)

Full Version: Cant open door
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I checked trought this script like 250 times, never spotted any mistake. I have watched series of tutorials and searched on forums for solution. Didnot find any working ones, so i decided to make my own post. Also i'm perfectly sure that those names are right, just like i setted them in level editor.


Code:
////////////////////////////
// Run first time starting map
void OnStart()
{  
   AddUseItemCallback("", "Superkey", "Superdoor", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity
{
    SetSwingDoorLocked("Superdoor", false, true);
    PlaySoundAtEntity("", "unlock_door", "Superdoor", 0.0f, false);
    RemoveItem("Superkey");
}

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

}

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

}
Code:
void UsedKeyOnDoor(string &in asItem, string &in asEntity

Missing )
Thank you, cant really believe i didnot see it ^^.