BadCoverMan
Junior Member
Posts: 27
Threads: 7
Joined: Feb 2012
Reputation:
0
RE: Multiple Keys
(02-21-2012, 08:10 PM) BallisticDK Wrote: it needs to be like this
Spoiler below!
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "LockedDoorKey1", "LockedDoor_1", "UsedLockedDoorKey1", true);
AddUseItemCallback("", "LockedDoorKey2", "LockedDoor_2", "UsedLockedDoorKey2", true);
}
void UsedLockedDoorKey1(string &in asItem, string &in asEntity)
{
AddUseItemCallback("", "SecondFloorKey", "LockedDoor_2", "UsedSecondFloorKey", true);
}
void UsedSecondFloorKey1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("LockedDoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "LockedDoor_1", 0, false);
RemoveItem("LockedDoorKey1");
}
void UsedSecondFloorKey2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("LockedDoor_2", false, true);
PlaySoundAtEntity("", "unlock_door", "LockedDoor_2", 0, false);
RemoveItem("SecondFloorKey");
}
1 AddUseItemCallback per door. i made that fail to, im also new to Scripting, <for Hardcore Scripters. do not flame me if there is an easyer way, im just saying how i do it >It didn't work.
02-21-2012, 08:19 PM