Restrict a base effect script to menumode?

Post » Tue May 17, 2011 2:47 pm

Having a problem with a mod running some base effect scripts at inappropriate gamemode times, for reasons I've been unable to figure out.

The base effects in question are only linked to ingestibles however - specifically food... so I had the thought that perhaps if I could restrict my effect scripts to only run in menumode, that might help (ideally only while in the pipboy). That would mean that food "wouldn't work" if hotkeyed and consumed outside of the pipboy, but I can live with that if it fixes my other problem.

...but I don't think I can use a menumode block in an effect script, and seems that I need the scripteffectstart block anyhow...


So how would I restrict that? Is there a way to detect the menumode in an if statement that I could wrap around the interior of my block?
User avatar
luis dejesus
 
Posts: 3451
Joined: Sun Aug 19, 2007 7:40 am

Post » Tue May 17, 2011 2:02 pm

Tried the http://geck.gamesas.com/index.php/MenuMode_%28Function%29 with the "main four" parameter?
    If MenuMode 1 ; "main four"        ; Restricted code    EndIf

User avatar
Chris Jones
 
Posts: 3435
Joined: Wed May 09, 2007 3:11 am

Post » Tue May 17, 2011 10:08 am

Tried the http://geck.gamesas.com/index.php/MenuMode_%28Function%29 with the "main four" parameter?
    If MenuMode 1 ; "main four"        ; Restricted code    EndIf


Oh, thank you!

My previous searching kept running me up against the menumode block, and somehow I either just didn't come across or else looked right over that page. From the description, sounds like it should work nicely - will give it a try tonight!
User avatar
Miss Hayley
 
Posts: 3414
Joined: Tue Jun 27, 2006 2:31 am


Return to Fallout 3