Aller au contenu

Photo

Do not drop inventory


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
archer4217

archer4217
  • Members
  • 105 messages
Hiya sweeties,

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

Thank you much for your help. :)

#2
Squatting Monk

Squatting Monk
  • Members
  • 446 messages
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 .


#3
archer4217

archer4217
  • Members
  • 105 messages
Thank you sweetie :) *hugs*