06-17-2012, 04:36 AM
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?
////////////////////////////
// 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?