RE: Key Isn't Opening My 2nd Door?
you forgot a 2 this should work.
void OnStart()
{
SetEntityConnectionStateChangeCallback("lever", "func_shelf");
AddUseItemCallback("", "key_1", "mansion_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "key_2", "mansion_3", "UsedKeyOnDoor2", true);
}
//----------------------------------------------------------------//
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_1");
}
void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("key_2");
}
void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("shelf",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
return;
}
}
void OnEnter()
{
}
void OnLeave()
{
}
I Highlighted the 2 you were missing
CURRENTLY WORKING ON:
Final Light = 40%
Need of voice actors.
|