Class: Game_Message

Game_Message()

new Game_Message()

The game object class for the state of the message window that displays text or selections, etc. Use as global variable $gameMessage
Properties:
Name Type Description
_texts Array.<String>
_choices Array.<String>
_faceName String
_faceIndex Number
_background Number
_positionType Number
_choiceDefaultType Number
_choiceCancelType Number
_choiceBackground Number
_choicePostionType Number
_numInputVariableId Number
_numInputMaxDigits Number
_itemChoiceVariableId Number
_itemChoiceItypeId Number
_scrollMode Boolean
_scrollSpeed Number
_scrollNoFast Boolean
_choiceCallback function

Methods

add(text)

Adds text to the game message object.
Parameters:
Name Type Description
text String

allText() → {String}

Returns all of the text contained within the message.
Returns:
Type
String

background() → {Number}

Returns the background associated with the message; this is the background
Returns:
Type
Number

choiceBackground() → {Number}

Returns the background type of the choice window.
Returns:
Type
Number

choiceCancelType()

choiceDefaultType()

choicePositionType() → {Number}

Returns the position of the choice window.
Returns:
Type
Number

choices()

clear()

faceIndex() → {Number}

Returns the face index within the face image to display the correct face.
Returns:
Type
Number

faceName() → {String}

Returns the name of the face image used for the message.
Returns:
Type
String

hasText() → {Boolean}

Returns true if the game message object has text.
Returns:
Type
Boolean

initialize()

isBusy() → {Boolean}

Returns true if the game message object has text, choices, number input, or item choice.
Returns:
Type
Boolean

isChoice() → {Boolean}

Returns true if the game message object has a set of choices.
Returns:
Type
Boolean

isItemChoice() → {Boolean}

Returns true if the game message object has an item choice attached.
Returns:
Type
Boolean

isNumberInput() → {Boolean}

Returns true if the game message object has a number input attached.
Returns:
Type
Boolean

itemChoiceItypeId() → {Number}

Returns the item choice item type id.
Returns:
Type
Number

itemChoiceVariableId() → {Number}

Returns the item choice variable id.
Returns:
Type
Number

newPage()

Creates a new page for the text within the message window.

numInputMaxDigits() → {Number}

Returns the number input maximum digits.
Returns:
Type
Number

numInputVariableId() → {Number}

Returns the number input variable id.
Returns:
Type
Number

onChoice(n)

Parameters:
Name Type Description
n Number

positionType() → {Number}

Returns the current position type of the message window.
Returns:
Type
Number

scrollMode() → {Boolean}

Returns true if the scroll mode is set to true.
Returns:
Type
Boolean

scrollNoFast() → {Boolean}

Returns true if the scroll is set to not being fast.
Returns:
Type
Boolean

scrollSpeed() → {Number}

Returns the scroll speed.
Returns:
Type
Number

setBackground(background)

Sets the background of the message window; options are 0 (fully opaque), 1 (transparent), 2 (invisible background). The default is 0.
Parameters:
Name Type Description
background Number

setChoiceBackground(background)

Parameters:
Name Type Description
background Number

setChoiceCallback(callback)

Sets a callback to be associated with a specific choice; a callback is a JavaScript function that will be run when the choice is selected.
Parameters:
Name Type Description
callback function

setChoicePositionType(positionType)

Sets the position of the choice window associated with the message window.
Parameters:
Name Type Description
positionType Number

setChoices(choices, defaultType, cancelType)

Sets the choices within the choice window; sets the default and cancel choices for the window.
Parameters:
Name Type Description
choices Array.<String>
defaultType Number
cancelType Number

setFaceImage(faceName, faceIndex)

Parameters:
Name Type Description
faceName String
faceIndex Number

setItemChoice(variableId, itemType)

Sets the choice and associates it with a variable id; sets the itemtype id associated with the choice.
Parameters:
Name Type Description
variableId Number
itemType Number

setNumberInput(variableId, maxDigits)

Sets the number input and associates it with a variable id; the max number of digits can also be set.
Parameters:
Name Type Description
variableId Number
maxDigits Number

setPositionType(positionType)

Sets the position of the message window; default is 2.
Parameters:
Name Type Description
positionType Number

setScroll(speed, noFast)

Sets the scroll speed of the message window; disable fast movement if noFast is set to true.
Parameters:
Name Type Description
speed Number
noFast Boolean