(03-13-2013, 05:26 PM)Coolfromdah00d Wrote: (03-13-2013, 05:14 PM)Adrianis Wrote: EDIT: Wait, you've got 2 functions called UsedKeyOnDoor. Name one of those different, because as it is that won't work
I've tried to name it something else but then it cant find the function (or cant read it) any idea what I can name it to?
void OnStart ()
{
AddUseItemCallback("", "StrangeDoorKey", "door03", "UsedKeyOnDoor2", false);
SetEntityCallbackFunc("GuestRoomKey", "jump");
AddUseItemCallback("", "GuestRoomKey", "door01", "UsedKeyOnDoor", false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door01", false, true);
PlaySoundAtEntity("", "Unlock_door", "door01", 0, false);
RemoveItem("GuestRoomKey");
}
void jump(string &in asEntity, string &in type)
{
SetEntityActive("corpse01", true);
PlaySoundAtEntity("", "12_girl_scream.snt", "corpse01", 0, false);
StartScreenShake(0.5f, 2, 0, 0.25);
GiveSanityDamage(5.0f, true);
}
void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door03", false, true);
PlaySoundAtEntity("", "Unlock_door", "door03", 0, false);
RemoveItem("StrangeDoorKey");
}