22 lines
638 B
Plaintext
22 lines
638 B
Plaintext
|
void main()
|
||
|
{
|
||
|
// Trash Eater Script by Tim Stursma October 6, 2002
|
||
|
// Delete All Contents Of Container When Closed
|
||
|
// Place on the "On Close" handle
|
||
|
// Start by defining oObject
|
||
|
object oObject = OBJECT_INVALID;
|
||
|
// Actions cleared
|
||
|
ClearAllActions();
|
||
|
// Get the first object in the container
|
||
|
oObject = GetFirstItemInInventory();
|
||
|
// Make sure the object is valid else end the script
|
||
|
while(oObject != OBJECT_INVALID)
|
||
|
{
|
||
|
// Destroy the object with a slight delay
|
||
|
DestroyObject(oObject, 0.1);
|
||
|
// Get the next item in the container
|
||
|
oObject = GetNextItemInInventory();
|
||
|
// Return to the valid object check
|
||
|
}
|
||
|
}
|