Frictional Games Forum (read-only)
Cant open door - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Cant open door (/thread-7334.html)



Cant open door - OPK - 04-13-2011

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

}



RE: Cant open door - nofsky - 04-13-2011

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

Missing )


RE: Cant open door - OPK - 04-13-2011

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