Author Topic: Do not drop inventory  (Read 328 times)

Legacy_archer4217

  • Full Member
  • ***
  • Posts: 206
  • Karma: +0/-0
Do not drop inventory
« on: July 11, 2013, 07:29:00 pm »


               Hiya sweeties,

Is there a way to stop a placeable from dropping its inventory when it gets destroyed?

Thank you much for your help. '<img'>
               
               

               
            

Legacy_Squatting Monk

  • Hero Member
  • *****
  • Posts: 776
  • Karma: +0/-0
Do not drop inventory
« Reply #1 on: July 11, 2013, 08:05:45 pm »


               Should be as simple as looping through the inventory OnDeath and deleting everything:


void main ()
{
    object oItem = GetFirstItemInInventory(OBJECT_SELF);
    while (GetIsObjectValid(oItem))
    {
        DestroyObject(oItem);
        oItem = GetNextItemInInventory(OBJECT_SELF);
    }
}

               
               

               


                     Modifié par Squatting Monk, 11 juillet 2013 - 07:06 .
                     
                  


            

Legacy_archer4217

  • Full Member
  • ***
  • Posts: 206
  • Karma: +0/-0
Do not drop inventory
« Reply #2 on: July 12, 2013, 05:46:45 am »


               Thank you sweetie '<img'> *hugs*