Frictional Games Forum (read-only)

Full Version: Whats wrong with that script?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey Guys, i've got a problem, i watched tutorials about scripting etc
i copied the script in the tutorials and just renamed the item and the door.
void OnStart()

{
AddUseItemCallback("", "doorkey2", "door2","UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in esEnity)
{
SetSwingDoorLocked("door2", false, true);
PlaySoundAtEnity("", "unlock_door", "door2", 0, false);
RemoveItem("doorkey2");
}
So, what is the problem exactly?
i try to open a door using a key, but its not working
(10-14-2011, 05:04 PM)Chaker Wrote: [ -> ]i try to open a door using a key, but its not working

What kind of door is it and have you checked to make sure that the door name matches the one in the script and that the key the user carries has the same name as the script?
yeah they are the same, can you add me in skype so i can show you screenshot or you can help me with teamviewer? skype: coka_leha
(10-14-2011, 05:11 PM)Chaker Wrote: [ -> ]yeah they are the same, can you add me in skype so i can show you screenshot or you can help me with teamviewer? skype: coka_leha

I don't have Skype, and while i have TeamViewer i would rather that any fix be publicly available for future reference.
i tried everything but nothin works :S
(10-14-2011, 06:37 PM)Chaker Wrote: [ -> ]i tried everything but nothin works :S

What's "everything"?
void UsedKeyOnDoor(string &in asItem, string &in esEnity)

Should Be asEntity

-Grey Fox
fixed but still not working
Pages: 1 2