Jump to content

Toggling GMST in MCM


Recommended Posts

Sorry, I meant GLOB. It's a global value, similar to a game setting (GMST), set with an integer. For example, if you want to disable dragons, in the console, you would type

set dragonsenabled to 0

Where dragonsenabled is a GLOB. In Papyrus, you'd have

GlobalValue property DragonsEnabled auto
DragonsEnabled.SetValueInt(0)

I'm not sure if I need to set them with If statements in the OnOptionSelect events or what.

Link to comment
Share on other sites

I see. Here's an example snipped from one of my scripts:

scriptname _LP_ConfigQuestScript extends SKI_ConfigBase
 
GlobalVariable Property _LP_SettingMusicSpeech Auto
 
String[] Pages
Int MusicSpeechToggle
 
Event OnConfigInit()
    Pages = new String[1]
    Pages[0] = "Options"
EndEvent
 
Event OnPageReset(String Page)
    If (Page == "")
        LoadCustomContent("skyui/res/mcm_logo.dds", 258, 95)
        Return
    Else
        UnloadCustomContent()
    EndIf
 
    If (Page == "Options")
        SetCursorFillMode(TOP_TO_BOTTOM)
        MusicSpeechToggle = AddToggleOption("Music Increases Speechcraft", _LP_SettingMusicSpeech.GetValue() As Int)
    EndIf
EndEvent
 
Event OnOptionHighlight(Int Option)
    If (Option == MusicSpeechToggle)
        SetInfoText("Whether playing music increases your speechcraft skill")
    EndIf
EndEvent
 
Event OnOptionSelect(Int Option)
    If (Option == MusicSpeechToggle)
        If _LP_SettingMusicSpeech.GetValue() As Int == 0
            _LP_SettingMusicSpeech.SetValue(1)
            SetToggleOptionValue(Option, 1)
        Else
            _LP_SettingMusicSpeech.SetValue(0)
            SetToggleOptionValue(Option, 0)
        EndIf
    EndIf
EndEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...