Sorry if this is simple, I have been looking around on the wikis and I am just getting confused.
What I am aiming to do (on a macro level):
create an MCM menu that allows the player to adjust two settings (tax amount and tax interval) for each of the nine Holds (total of 18 integers). These settings are referred to in a number of quest scripts.
My Implementation theory:
There will be a lot of duplication of work in the quest scripts- essentially performing the same task for each of the Holds - as such I wanted to utilise two arrays (one for tax amounts[9] and one for intervals[9]) to store the 18 integers mentioned above.
My MCM script (edited with just one Hold for simplicity):
How do I declare my arrays? - current declarations don't work.
Will using arrays in this manner work for MCM options? Or do I need to use globals?
thanks!
Scriptname totnhMCMScript extends SKI_ConfigBase {MCM for totnh Taxes.}int[] holdTaxArrayint[] holdIntervalArrayInt ShowCompMesEvent OnPageReset(string a_page) If a_page == "" LoadCustomContent("totnh.dds", 56, 73) Else UnloadCustomContent() EndIf If a_page == "Customization" SetCursorFillMode(TOP_TO_BOTTOM) AddHeaderOption("Falkreath Hold") AddSliderOptionST("FalkreathTaxState", "Falkreath Tax Amount", holdTaxArray[0].GetValue()) AddSliderOptionST("FalkreathIntervalState", "Falkreath Tax Interval", holdIntervalArray[0].GetValue()) AddEmptyOption() EndIfendEvent;///////////////////States for options//////////////////////////////State FalkreathIntervalStateEvent OnDefaultST() SetSliderOptionValueST(15.0)EndEventEvent OnHighlightST() SetInfoText("Set tax interval in days.") EndEventEvent OnSliderOpenST() SetSliderDialogStartValue(holdIntervalArray[0].GetValue()) SetSliderDialogDefaultValue(15) SetSliderDialogRange(7, 90) SetSliderDialogInterval(1)EndEventEvent OnSliderAcceptST(float value) holdIntervalArray[0].SetValue(value) SetSliderOptionValueST(holdIntervalArray[0].GetValue())EndEventEndStateState FalkreathtaxStateEvent OnDefaultST() SetSliderOptionValueST(100.0)EndEventEvent OnHighlightST() SetInfoText("Set tax amount.") EndEventEvent OnSliderOpenST() SetSliderDialogStartValue(holdTaxArray[0].GetValue()) SetSliderDialogDefaultValue(100) SetSliderDialogRange(0, 5000) SetSliderDialogInterval(10)EndEventEvent OnSliderAcceptST(float value) holdTaxArray[0].SetValue(value) SetSliderOptionValueST(holdTaxArray[0].GetValue())EndEventEndState