Author Topic: How long does it take for an object to actually get destroyed?  (Read 352 times)

Legacy_CheeseshireCat

  • Jr. Member
  • **
  • Posts: 79
  • Karma: +0/-0
How long does it take for an object to actually get destroyed?
« on: November 28, 2010, 05:04:37 pm »


               Splitting from another thread.

I have noticed that when I need to clean up some objects (not inventory items) the same approach often doesn't work, because there just isn't GetNextObjectByTag and GetObjectByTag still often picks the same object even if I destroy it, often looping like forever resulting in the "Too Many Instructions" error.

So what would be the most correct way to do that?

So far, I have to resort to two loops, one while GetObjectByTag("tag", i) isn't OBJECT_INVALID and going i++, then running another loop, a for one, *down* as (i, i>=0, i--), actually destroying them. Down because if going up, objects can get destroyed in time, "dropping" the rest down so that some don't get destroyed.
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
How long does it take for an object to actually get destroyed?
« Reply #1 on: November 28, 2010, 05:13:19 pm »


               This might help ya:

social.bioware.com/forum/1/topic/192/index/5209091