I kind of got in a bit of a mess when trying to make only ONE item open a chest. Can anyone help?
PS If this is too complicated and the moderators delete this, ill understand.
function igumkey_a;
function oChest_UseInv()
{
if (player.ActiveInventory == igumkey)
{
player.LoseInventory(igumkey);
player.Say("Great it's unlocked!");
oChest.Graphic = 6;
chestUnlocked = true;
}
else
{
player.Say("As you can see, it's locked and I need some sort of key");
}
}
function oChest_Interact()
{
if (!chestUnlocked)
{
player.Say("It's locked, and I can't reach inside.");
}
else
{
if (!chestEmpty)
{
player.Say("Now I have the camera.");
player.AddInventory(icamera);
chestEmpty = true;
oChest.Visible = false;
}
else
{
player.Say("Nothing in that chest.");
}
}
}
PS If this is too complicated and the moderators delete this, ill understand.
function igumkey_a;
function oChest_UseInv()
{
if (player.ActiveInventory == igumkey)
{
player.LoseInventory(igumkey);
player.Say("Great it's unlocked!");
oChest.Graphic = 6;
chestUnlocked = true;
}
else
{
player.Say("As you can see, it's locked and I need some sort of key");
}
}
function oChest_Interact()
{
if (!chestUnlocked)
{
player.Say("It's locked, and I can't reach inside.");
}
else
{
if (!chestEmpty)
{
player.Say("Now I have the camera.");
player.AddInventory(icamera);
chestEmpty = true;
oChest.Visible = false;
}
else
{
player.Say("Nothing in that chest.");
}
}
}