Frictional Games Forum (read-only)

Full Version: Removing lantern from Inventory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using
Code:
RemoveItem("lantern.ent");
but it won't remove the lantern from my inventory.

The lantern was given to you in the first map, but the code is used in another map.
Code:
GiveItemFromFile("lantern", "lantern.ent");

The names match up, so what am I doing wrong?
(08-01-2011, 12:40 AM)Rapture Wrote: [ -> ]
Code:
RemoveItem("lantern.ent");

There should not be .ent in the RemoveItem command, just latern.
thanks alot
To remove the lantern if the player has it equipped, simply disable the lantern and then remove item with maybe a time break between both actions. You also need a SetLanternDisabled command function.

SetLanternDisabled(bool abX);

SetLanternDisabled(bool abX);

RemoveItem(string& asName);