How do I check if a container is empty...?

Post » Tue Nov 20, 2012 12:20 pm

Please, how do I check if a container is empty after immediately closing it?
I need this to happen:
1) Player Activates - Opens container and either transfers things in or out.
2) Player Closes Container
3) Container does a check to see if it's empty or not. if so.. run certain code (which hasn't been written or thought of yet)

Most appreciative for any help.

Thanks,

-Mush-
User avatar
Darren Chandler
 
Posts: 3361
Joined: Mon Jun 25, 2007 9:03 am

Post » Tue Nov 20, 2012 6:24 am

There are some scripts posted in http://www.gamesas.com/topic/1416841-container-maximum-encumbrance-is-it-possible/page__p__21651537__hl__container%20weight__fromsearch__1#entry21651537 that may prove useful. Hope this helps!
User avatar
Project
 
Posts: 3490
Joined: Fri May 04, 2007 7:58 am

Post » Tue Nov 20, 2012 11:00 am

Found a way, thanks. Been reading all night and it never occured to me that 'registerforsingleupdate' doesn't count down while the player is in inventory/container.

So during the OnActivate event, i called registerforsingleupdate. then on an OnUpdate event 1 second after the menu closes it does what
i need it to do. :)

-Mush-
User avatar
Madeleine Rose Walsh
 
Posts: 3425
Joined: Wed Oct 04, 2006 2:07 am


Return to V - Skyrim