Skip to content

mwseMCMGlobalBoolean⚓︎

A variable connected to a Morrowind Global. Treats 0 as false and >=1 as true.

This type inherits the following: mwseMCMGlobal, mwseMCMVariable

Properties⚓︎

class⚓︎

The type of the variable.

Returns:

  • result (string)

componentType⚓︎

The type of this component.

Returns:

  • result ("Variable")

converter⚓︎

Converter isn't used for this Variable type.

Returns:

  • result (nil)

id⚓︎

The id of the Morrowind Global.

Returns:

  • result (string)

inGameOnly⚓︎

Read-only. Always true for this variable type, since global variables can only be changed while the game is loaded.

Returns:

  • result (true)

restartRequired⚓︎

If true, updating the setting containing this variable will notify the player to restart the game.

Returns:

  • result (boolean)

restartRequiredMessage⚓︎

The default text is a localized version of: "The game must be restarted before this change will come into effect.".

Returns:

  • result (string)

value⚓︎

The value stored in the variable.

Returns:

  • result (unknown)

Methods⚓︎

get⚓︎

Returns the value stored in the Morrowind Global variable.

local value = myObject:get()

Returns:

  • value (boolean, nil)

new⚓︎

Creates a new variable of this type.

local variable = myObject:new({ id = ... })

Parameters:

  • variable (table, string): If passing only a string, it will be used as variable's id.
    • id (string): The id of the Morrowind Global.

Returns:


set⚓︎

Changes the value stored in the Global variable.

myObject:set(newValue)

Parameters:

  • newValue (boolean)