yea my english is really bad sorry
a menu is displayed using a message box within the menu has options like hat, mask, armor
if i click on hat it will equip my hat item which has a script attatched
however the script does not run if i equip it using the menu but runs it i equip through normal means eg pipboy or hotkey
script below is used to equip a item using menu
scn StaticEMScriptshort Equippedshort menushort buttonBegin onEquip playershowMessage StaticEMMessageEquipset Equipped to 1EndBegin onUnEquip playershowMessage StaticEMMessageUnequipset Equipped to 0EndBegin onDrop playershowMessage StaticEMMessageUnequipset Equipped to 0EndBegin GameModeIf IsKeyPressed 76 && Equipped == 1 set menu to 1 showMessage StaticEMMessageMainMenuendIfif menu == 1Set button to getButtonPressed If Button == 0 ElseIf Button == 1 if player.getItemCount StaticBackpack == 1 player.equipItem StaticBackpack 0 1 endIf ElseIf Button == 2 if player.getItemCount StaticShieldRemote == 1 player.equipItem StaticShieldRemote 0 1 endIf ElseIf Button == 3 if player.getItemCount StaticDroneComLink == 1 player.equipItem StaticDroneComLink 0 1 endIf ElseIf Button == 4 if player.getItemCount StaticBatteryCharger == 1 activate player.equipItem StaticBatteryCharger 0 1 endIf EndIfendIfEnd
in menu i choose button 3 which will equip the drone com link
scn StaticDroneComScriptShort ButtonShort ActiveShort WeaponsRef DroneComBegin onEquip playerset Active to 1showMessage StaticDroneComActiveEndBegin onUnEquip playerset Active to 0showMessage StaticDroneComDeactiveEndBegin GameMode if Active == 1 If IsKeyPressed 71 showMessage StaticDroneComMessage endIfendifEndBegin GameModeSet Button to GetButtonPressedIf Button == 0elseif Button == 1 if StaticDroneDialogue.TDC1Activated && StaticDroneDialogue.TDC1Leave==0 StaticDroneCompanionCRef.MoveTo Player endif if StaticDroneDialogue.TDC2Activated && StaticDroneDialogue.TDC2Leave==0 StaticDroneCompanionC2Ref.MoveTo Player endif if StaticDroneShieldOnRef.getdisabled if StaticDroneDialogue.TDSActivated && StaticDroneDialogue.TDSLeave==0 StaticDroneShieldOffRef.MoveTo Player endif else if StaticDroneDialogue.TDSActivated && StaticDroneDialogue.TDSLeave==0 StaticDroneShieldOnRef.MoveTo Player endif endif if StaticDroneDialogue.TDRActivated && StaticDroneDialogue.TDRLeave==0 StaticDroneRailRef.MoveTo Player endif if StaticDroneDialogue.TDCLActivated && StaticDroneDialogue.TDCLLeave==0 StaticDroneCLinkRef.MoveTo Player endifelseif Button == 2 StaticDroneCompanionCRef.MoveTo Player StaticDroneCompanionC2Ref.MoveTo Player StaticDroneShieldOffRef.MoveTo Player StaticDroneShieldOnRef.MoveTo Player StaticDroneRailRef.MoveTo Player StaticDroneCLinkRef.MoveTo Playerelseif Button == 3 StaticDroneCLinkRef.MoveTo Playerelseif Button == 4 if StaticDroneDialogue.shieldOn == 1 set StaticDroneDialogue.shieldOn to 0 showmessage StaticDroneComShieldsOff else set StaticDroneDialogue.shieldOn to 1 showmessage StaticDroneComShieldsOn endifelseif Button == 5 if StaticDroneDialogue.stealthOn == 1 set StaticDroneDialogue.stealthOn to 0 showmessage StaticDroneComStealthOff else set StaticDroneDialogue.stealthOn to 1 showmessage StaticDroneComStealthOn endifelseif Button == 6 StaticDroneCLinkRef.ResetHealth StaticDroneRailRef.ResetHealth StaticDroneCompanionCRef.ResetHealth StaticDroneCompanionC2Ref.ResetHealth StaticDroneShieldOnRef.ResetHealth StaticDroneShieldOffRef.ResetHealth showMessage StaticDroneSelfRepairelseif Button == 7 if StaticDroneDialogue.TDC1Follow == 1 && StaticDroneDialogue.TDC1Leave == 1 set StaticDroneDialogue.TDC1Follow to 1 set StaticDroneDialogue.TDC1Leave to 0 endIf if StaticDroneDialogue.TDC2Follow == 1 && StaticDroneDialogue.TDC2Leave == 1 set StaticDroneDialogue.TDC2Follow to 1 set StaticDroneDialogue.TDC2Leave to 0 endIf if StaticDroneDialogue.TDSFollow == 1 && StaticDroneDialogue.TDSLeave == 1 set StaticDroneDialogue.TDSFollow to 1 set StaticDroneDialogue.TDSLeave to 0 endIf if StaticDroneDialogue.TDRFollow == 1 && StaticDroneDialogue.TDRLeave == 1 set StaticDroneDialogue.TDRFollow to 1 set StaticDroneDialogue.TDRLeave to 0 endIf if StaticDroneDialogue.TDCLFollow == 1 && StaticDroneDialogue.TDCLLeave == 1 set StaticDroneDialogue.TDCLFollow to 1 set StaticDroneDialogue.TDCLLeave to 0 endIf showMessage StaticDroneActiveFollowelseif Button == 8 set StaticDroneDialogue.TDC1Leave to 1 set StaticDroneDialogue.TDC2Leave to 1 set StaticDroneDialogue.TDRLeave to 1 set StaticDroneDialogue.TDSLeave to 1 set StaticDroneDialogue.TDCLLeave to 1 StaticDroneRailRef.evp StaticDroneCompanionCRef.evp StaticDroneCompanionC2Ref.evp StaticDroneShieldOffRef.evp StaticDroneShieldOnRef.evp showMessage StaticDroneWaitelseif Button == 9 set StaticDroneDialogue.TDC1Follow to 0 set StaticDroneDialogue.TDC1Leave to 1 set StaticDroneDialogue.TDC2Follow to 0 set StaticDroneDialogue.TDC2Leave to 1 set StaticDroneDialogue.TDSFollow to 0 set StaticDroneDialogue.TDSLeave to 1 set StaticDroneDialogue.TDRFollow to 0 set StaticDroneDialogue.TDRLeave to 1 StaticDroneRailRef.evp StaticDroneCompanionCRef.evp StaticDroneCompanionC2Ref.evp StaticDroneShieldOffRef.evp StaticDroneShieldOnRef.evp showMessage StaticDroneRtbendifEnd