How to tell a container is closed (no longer open)?

Post » Fri May 04, 2012 10:59 am

I'm trying to script a magic effect on a timer that will abort if the container is closed before the timer runs out. I don't want to tie it to the player taking something from the container because they will be warned to not take anything. There doesn't seem to be an "OnDeactive" block.

-Dubious-
User avatar
Queen Bitch
 
Posts: 3312
Joined: Fri Dec 15, 2006 2:43 pm

Post » Fri May 04, 2012 5:56 pm

MenuMode 1008, the http://cs.elderscrolls.com/index.php/MenuMode_(Function) and/or http://cs.elderscrolls.com/index.php/MenuMode, should help?
User avatar
Pumpkin
 
Posts: 3440
Joined: Sun Jun 25, 2006 10:23 am

Post » Fri May 04, 2012 6:23 am

MenuMode 1008, the http://cs.elderscrolls.com/index.php/MenuMode_(Function) and/or http://cs.elderscrolls.com/index.php/MenuMode, should help?

Not what I expected, but I'm still a complete noob at this. Just to be clear, if I script:

If (MenuMod 1008 == 0)

then no container is open/active because the game is in Game Mode when a container is not open; and returns 1 when in Menu Mode for a container or barter menu that is open? Or do I need a ref for the container in question?

Thanks for the reply.

-Dubious-
User avatar
Marlo Stanfield
 
Posts: 3432
Joined: Wed May 16, 2007 11:00 pm

Post » Fri May 04, 2012 5:38 am

Yeah, an 'If MenuMode 1008' condition will not return true unless you're in a container menu, nor will code in a MenuMode 1008 block run. If you want to exclude vendors, you might want OBSE's http://cs.elderscrolls.com/index.php/IsBarterMenuActive. If you post the script, I or another here ought to be able to help. There are bound to be several ways to accomplish what you're after :)
User avatar
Monika Krzyzak
 
Posts: 3471
Joined: Fri Oct 13, 2006 11:29 pm


Return to IV - Oblivion