Frictional Games Forum (read-only)

Full Version: Locked door
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can you help me with the script for the key and a locked door.
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "HU2key_1", "HUdoor", "UsedKeyOnDoor", true);
}

void UsedHU2key_1(string &in asItem, string &in asEntity)

{
SetSwingDoorLocked("HUdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "HUdoor", 0, false);
RemoveItem("HU2key_1");

That is the script. What am I doing wrong? Sad
You have the UseItemCallback calling the function "UsedKeyOnDoor", while your unlock function is "UsedHu2key_1"
Oh, and you're missing an end brace after the UsedHU2key_1 function.
Thank you.... I love you haha Big Grin

(06-17-2012, 04:38 AM)Obliviator27 Wrote: [ -> ]You have the UseItemCallback calling the function "UsedKeyOnDoor", while your unlock function is "UsedHu2key_1"
Oh, and you're missing an end brace after the UsedHU2key_1 function.
Thank you so much!
I'm so happy I could just scream!...... yey :3