Creating A Trashcan[edit | edit source]

To make a trash can place an item, such as a barrel, in your area then open the properties. Make sure "useable" and "has inventory" are checked, then go to scripts, and place the following script in "OnClose"

//  Trash Can Script
void main()
{
object oItem = GetFirstItemInInventory();
if(GetIsObjectValid(oItem))
    {
    while(GetIsObjectValid(oItem))
        {
        SetPlotFlag(oItem, FALSE);
        DestroyObject(oItem);
        oItem = GetNextItemInInventory();
        }
    }
}

Note[edit | edit source]

Remove any script from "OnOpen" to make sure there is no treasure in the trash can when PC's open them.

Community content is available under CC-BY-SA unless otherwise noted.