I have just started with the editor. but when i script so a key would open a door i just get error when opening my map...
Here is my scrip
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "monsterdoorkey_1", "monsterdoor", "UsedKeyOnDoor", true);
}
void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("monsterdoor", False, True);
PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
RemoveItem(monsterdoorkey_1);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Anyone got a clue whats wrong?
Sorry for my bad english