SandMouseAnarchy Posted May 12, 2019 Share Posted May 12, 2019 Hi guys, i have a script that shows an options message when a piece of clothing is equipped, it works great but the message shows every time i exit power armor or exit a workbench or anything like that that updates the player invintory. Does anyone know how i can contain the Options message to only show when the player has their pipboy open and not at any other time? ((ive tried listening for onmenuopenclose event and the ontutorial event for the pipboy invintory screen, but neither seem to be working or even detecting the pipboy being open and my options message wont show...)) This is the base script that i have so far without any menu event registration etc... Scriptname SM_Equip extends ObjectReference Message Property OptionsMESG Auto Mandatory Const ObjectMod Property Mod_NoCollar Auto Mandatory Const ObjectMod Property Mod_Collar Auto Mandatory Const Bool CurrentlyAttachingMod = False Event OnEquipped(Actor akActor) If !CurrentlyAttachingMod && akActor == Game.GetPlayer() && !akActor.IsInPowerArmor() If !NewGameStarted && !CurrentlyAttachingMod && akActor == Game.GetPlayer() && !akActor.IsInPowerArmor() CurrentlyAttachingMod = True Int iButton = OptionsMESG.Show() ; Shows your menu. If iButton == 0 ; Nocollar AttachMod(Mod_Nocollar) Debug.Notification("No collar selected") ElseIf iButton == 1 ; collar AttachMod(Mod_collar) Debug.Notification("collar selected") ElseIf iButton == 2 ; cancel Debug.Notification("Style unchanged") EndIf CurrentlyAttachingMod = False EndIf EndEvent If anyone has any ideas or suggestions i would love to hear 'em. ^.^ Link to comment Share on other sites More sharing options...
SKKmods Posted May 12, 2019 Share Posted May 12, 2019 Try (Utility.IsInMenuMode() == TRUE) Link to comment Share on other sites More sharing options...
SandMouseAnarchy Posted May 15, 2019 Author Share Posted May 15, 2019 Thankyou SKK50!!! That's exactly what i needed!!! :D Link to comment Share on other sites More sharing options...
Recommended Posts