2024-12-26 22:55:31 -05:00
|
|
|
//OnClosed event of a <span class="highlight">barrel</span> or what is being used as a <span class="highlight">trash</span> can.
|
|
|
|
|
2024-06-14 10:48:20 -04:00
|
|
|
void main()
|
|
|
|
{
|
2024-12-26 22:55:31 -05:00
|
|
|
//Go through all items in the container, destroying them as we find them.
|
|
|
|
object oTrash = GetFirstItemInInventory();
|
|
|
|
while (GetIsObjectValid(oTrash))
|
|
|
|
{
|
|
|
|
DestroyObject(oTrash);
|
2024-06-14 10:48:20 -04:00
|
|
|
|
2024-12-26 22:55:31 -05:00
|
|
|
oTrash = GetNextItemInInventory();
|
|
|
|
//If this next item is valid, meaning that there is another item in the
|
|
|
|
//inventory, then the loop will go again.
|
|
|
|
//Once the inventory has been sifted through, the loop exits and all
|
|
|
|
//items are destroyed.
|
2024-06-14 10:48:20 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|