Recent changes Random page
GAMING
Gaming
 
WoWWiki
Diablo Wiki
Fallout-The Vault
Grand Theft Wiki
Halopedia
StarCraft Wiki
FFXIclopedia
Resident Evil Wiki
See more...

Trash can

From NWNWiki

Jump to: navigation, search


[edit] Creating A Trashcan

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();
        }
    }
}

[edit] Note

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

Rate this article:
Share this article: