Component_CommandInterpreter Class
A component which allows a game object to process commands like for scene-objects. For each command a command-function exists. To add own custom commands to the interpreter just create a sub-class and override the gs.Component_CommandInterpreter.assignCommand method and assign the command-function for your custom-command.
Item Index
Methods
- assignCommand
- blendObject
- booleanValueAtIndex
- booleanValueOf
- callCommonEvent
- callScene
- changeDecimalVariables
- commandAddHotspot
- commandAudioDefaults
- commandBackgroundDefaults
- commandBackgroundEffect
- commandBackgroundMotionBlur
- commandBacklogVisibility
- commandBlendBackground
- commandBlendCharacter
- commandBlendPicture
- commandBlendText
- commandBlendVideo
- commandBreakLoop
- commandCallCommonEvent
- commandCallScene
- commandChangeBackground
- commandChangeBooleanVariables
- commandChangeColors
- commandChangeDecimalVariables
- commandChangeHotspotState
- commandChangeNumberVariables
- commandChangeObjectDomain
- commandChangeScene
- commandChangeScreenCursor
- commandChangeSounds
- commandChangeStringVariables
- commandChangeTextSettings
- commandChangeTextSettings
- commandChangeTransition
- commandChangeVariableDomain
- commandCharacterChangeExpression
- commandCharacterDefaults
- commandCharacterEffect
- commandCharacterExitScene
- commandCharacterGetParameter
- commandCharacterJoinScene
- commandCharacterMotionBlur
- commandCharacterSetParameter
- commandCheckNumberVariable
- commandCheckSwitch
- commandCheckTextVariable
- commandChoiceTimer
- commandClearMessage
- commandClosePageNVL
- commandColorText
- commandCondition
- commandConditionElse
- commandConditionElseIf
- commandCreateMessageArea
- commandCropPicture
- commandCropVideo
- commandEndCommonEvent
- commandEraseHotspot
- commandEraseImageMap
- commandEraseMessageArea
- commandErasePicture
- commandEraseText
- commandEraseVideo
- commandFlashCharacter
- commandFlashPicture
- commandFlashScreen
- commandFlashVideo
- commandFreezeScreen
- commandGetGameData
- commandGetInputData
- commandGetObjectData
- commandIdle
- commandInputNumber
- commandInputText
- commandJumpToLabel
- commandL2DDefaults
- commandL2DExitScene
- commandL2DExpression
- commandL2DJoinScene
- commandL2DMotion
- commandL2DMotionGroup
- commandL2DMove
- commandL2DParameter
- commandL2DSettings
- commandLabel
- commandListAdd
- commandListClear
- commandListCopy
- commandListFromText
- commandListIndexOf
- commandListInsertAt
- commandListJoin
- commandListLength
- commandListPop
- commandListRemoveAt
- commandListSet
- commandListShift
- commandListShuffle
- commandListSort
- commandListValueAt
- commandLoadGame
- commandLoop
- commandMaskBackground
- commandMaskCharacter
- commandMaskPicture
- commandMaskVideo
- commandMessageBoxDefaults
- commandMessageBoxVisibility
- commandMessageFading
- commandMessageSettings
- commandMessageVisibility
- commandMoveCharacter
- commandMoveCharacterPath
- commandMovePicture
- commandMovePicturePath
- commandMoveText
- commandMoveTextPath
- commandMoveVideo
- commandMoveVideoPath
- commandNumberCondition
- commandOpenLoadMenu
- commandOpenMenu
- commandOpenSaveMenu
- commandPanScreen
- commandPauseMusic
- commandPauseTimer
- commandPictureDefaults
- commandPictureEffect
- commandPictureMotionBlur
- commandPlayMusic
- commandPlayPictureAnimation
- commandPlaySound
- commandPlayVideo
- commandPrepareSaveGame
- commandRefreshText
- commandResetGlobalData
- commandResetVariables
- commandResumeCommonEvent
- commandResumeMusic
- commandResumeTimer
- commandReturnToPreviousScene
- commandReturnToTitle
- commandRotateBackground
- commandRotateCharacter
- commandRotatePicture
- commandRotateScreen
- commandRotateText
- commandRotateVideo
- commandSaveGame
- commandSavePersistentData
- commandSaveSettings
- commandScreenEffect
- commandScreenTransition
- commandScript
- commandScrollBackground
- commandScrollBackgroundPath
- commandScrollBackgroundTo
- commandSetGameData
- commandSetMessageArea
- commandSetObjectData
- commandSetTargetMessage
- commandShakeBackground
- commandShakeCharacter
- commandShakePicture
- commandShakeScreen
- commandShowChoice
- commandShowChoices
- commandShowImageMap
- commandShowMessage
- commandShowMessageNVL
- commandShowPicture
- commandShowText
- commandShowVideo
- commandStartTimer
- commandStopMusic
- commandStopSound
- commandStopTimer
- commandSwitchToLayout
- commandTextEffect
- commandTextMotionBlur
- commandTintBackground
- commandTintCharacter
- commandTintPicture
- commandTintScreen
- commandTintVideo
- commandUIAccess
- commandUnlockCG
- commandVideoDefaults
- commandVideoEffect
- commandVideoMotionBlur
- commandWait
- commandWaitForInput
- commandZoomBackground
- commandZoomCharacter
- commandZoomPicture
- commandZoomScreen
- commandZoomText
- commandZoomVideo
- compare
- cropObject
- dispose
- durationValueOf
- eraseObject
- executeAction
- executeCommand
- flashObject
- isInputDataCommand
- isMessageCommand
- isProcessingMessageInOtherContext
- jumpToLabel
- listObjectOf
- maskObject
- messageBoxObject
- messageObject
- messageObjectADV
- messageObjectId
- messageObjectNVL
- messageSettings
- moveObject
- moveObjectPath
- numberValueAtIndex
- numberValueOf
- objectEffect
- objectMotionBlur
- onCallSceneFinish
- onChoiceAccept
- onCommonEventFinish
- onInputNumberFinish
- onInputTextFinish
- onJumpTo
- onJumpTo
- onMessageADVClear
- onMessageADVDisappear
- onMessageADVWaiting
- onMessageNVLFinish
- onMessageNVLFinish
- predefinedObjectPosition
- preview
- restore
- resume
- rotateObject
- scrollObjectPath
- setBooleanValueAtIndex
- setBooleanValueTo
- setListObjectTo
- setNumberValueAtIndex
- setNumberValueTo
- setStringValueAtIndex
- setStringValueTo
- setup
- shakeObject
- showObject
- skip
- start
- stop
- storeListValue
- stringValueAtIndex
- stringValueOf
- targetMessage
- targetMessageBox
- tintObject
- toDataBundle
- update
- wait
- waitForCompletion
- waitForMessage
- zoomObject
Methods
assignCommand
()
Assigns the correct command-function to the specified command-object if necessary.
blendObject
-
object
-
A
Blends a game object.
Parameters:
-
object
gs.Object_Base- The game object to blend.
-
A
Objectparams object containing additional info.
booleanValueAtIndex
-
scope
-
index
Gets the value of the boolean variable at the specified index.
Parameters:
-
scope
Number- The variable's scope.
-
index
Number- The index of the variable to get the value from.
Returns:
The value of the variable.
booleanValueOf
-
object
Gets the value of a (possible) boolean variable. If a constant boolean value is specified, this method does nothing an just returns that constant value. That's to make it more comfortable to just pass a value which can be calculated by variable but also be just a constant value.
Parameters:
-
object
Boolean | Object- A boolean variable or constant boolean value.
Returns:
The value of the variable.
callCommonEvent
-
id
-
parameters
-
wait
Calls a common event and returns the sub-interpreter for it.
Parameters:
-
id
Number- The ID of the common event to call.
-
parameters
Object- Optional common event parameters.
-
wait
Boolean- Indicates if the interpreter should be stay in waiting-mode even if the sub-interpreter is finished.
callScene
-
uid
Calls a scene and returns the sub-interpreter for it.
Parameters:
-
uid
String- The UID of the scene to call.
changeDecimalVariables
-
params
-
roundMethod
Changes number variables and allows decimal values such as 0.5 too.
Parameters:
-
params
Object- Input params from the command
-
roundMethod
Object- The result of the operation will be rounded using the specified method.
- 0 = None. The result will not be rounded.
- 1 = Commercially
- 2 = Round Up
- 3 = Round Down
commandAddHotspot
()
protected
commandAudioDefaults
()
protected
commandBackgroundDefaults
()
protected
commandBackgroundEffect
()
protected
commandBackgroundMotionBlur
()
protected
commandBacklogVisibility
()
protected
commandBlendBackground
()
protected
commandBlendCharacter
()
protected
commandBlendPicture
()
protected
commandBlendText
()
protected
commandBlendVideo
()
protected
commandBreakLoop
()
protected
Break Loop
commandCallCommonEvent
()
protected
commandCallScene
()
protected
commandChangeBackground
()
protected
commandChangeBooleanVariables
()
protected
commandChangeColors
()
protected
commandChangeDecimalVariables
()
protected
commandChangeHotspotState
()
protected
commandChangeNumberVariables
()
protected
commandChangeObjectDomain
()
protected
commandChangeScene
()
protected
commandChangeScreenCursor
()
protected
commandChangeSounds
()
protected
commandChangeStringVariables
()
protected
commandChangeTextSettings
()
protected
commandChangeTextSettings
()
protected
commandChangeTransition
()
protected
commandChangeVariableDomain
()
protected
commandCharacterChangeExpression
()
protected
commandCharacterDefaults
()
protected
commandCharacterEffect
()
protected
commandCharacterExitScene
()
protected
commandCharacterGetParameter
()
protected
commandCharacterJoinScene
()
protected
commandCharacterMotionBlur
()
protected
commandCharacterSetParameter
()
protected
commandCheckNumberVariable
()
protected
commandCheckSwitch
()
protected
commandCheckTextVariable
()
protected
commandChoiceTimer
()
protected
commandClearMessage
()
protected
commandClosePageNVL
()
protected
commandColorText
()
protected
commandCondition
()
protected
commandConditionElse
()
protected
commandConditionElseIf
()
protected
commandCreateMessageArea
()
protected
commandCropPicture
()
protected
commandCropVideo
()
protected
commandEndCommonEvent
()
protected
commandEraseHotspot
()
protected
commandEraseImageMap
()
protected
commandEraseMessageArea
()
protected
commandErasePicture
()
protected
commandEraseText
()
protected
commandEraseVideo
()
protected
commandFlashCharacter
()
protected
commandFlashPicture
()
protected
commandFlashScreen
()
protected
commandFlashVideo
()
protected
commandFreezeScreen
()
protected
commandGetGameData
()
protected
commandGetInputData
()
protected
commandGetObjectData
()
protected
commandIdle
()
protected
Idle
commandInputNumber
()
protected
commandInputText
()
protected
commandJumpToLabel
()
protected
commandL2DDefaults
()
protected
commandL2DExitScene
()
protected
commandL2DExpression
()
protected
commandL2DJoinScene
()
protected
commandL2DMotion
()
protected
commandL2DMotionGroup
()
protected
commandL2DMove
()
protected
commandL2DParameter
()
protected
commandL2DSettings
()
protected
commandLabel
()
protected
commandListAdd
()
protected
commandListClear
()
protected
commandListCopy
()
protected
commandListFromText
()
protected
commandListIndexOf
()
protected
commandListInsertAt
()
protected
commandListJoin
()
protected
commandListLength
()
protected
commandListPop
()
protected
commandListRemoveAt
()
protected
commandListSet
()
protected
commandListShift
()
protected
commandListShuffle
()
protected
commandListSort
()
protected
commandListValueAt
()
protected
commandLoadGame
()
protected
commandLoop
()
protected
Loop
commandMaskBackground
()
protected
commandMaskCharacter
()
protected
commandMaskPicture
()
protected
commandMaskVideo
()
protected
commandMessageBoxDefaults
()
protected
commandMessageBoxVisibility
()
protected
commandMessageFading
()
protected
commandMessageSettings
()
protected
commandMessageVisibility
()
protected
commandMoveCharacter
()
protected
commandMoveCharacterPath
()
protected
commandMovePicture
()
protected
commandMovePicturePath
()
protected
commandMoveText
()
protected
commandMoveTextPath
()
protected
commandMoveVideo
()
protected
commandMoveVideoPath
()
protected
commandNumberCondition
()
protected
commandOpenLoadMenu
()
protected
commandOpenMenu
()
protected
commandOpenSaveMenu
()
protected
commandPanScreen
()
protected
commandPauseMusic
()
protected
commandPauseTimer
()
protected
Pauses Timer
commandPictureDefaults
()
protected
commandPictureEffect
()
protected
commandPictureMotionBlur
()
protected
commandPlayMusic
()
protected
commandPlayPictureAnimation
()
protected
commandPlaySound
()
protected
commandPlayVideo
()
protected
commandPrepareSaveGame
()
protected
commandRefreshText
()
protected
commandResetGlobalData
()
protected
commandResetVariables
()
protected
commandResumeCommonEvent
()
protected
commandResumeMusic
()
protected
commandResumeTimer
()
protected
Resume Timer
commandReturnToPreviousScene
()
protected
commandReturnToTitle
()
protected
commandRotateBackground
()
protected
commandRotateCharacter
()
protected
commandRotatePicture
()
protected
commandRotateScreen
()
protected
commandRotateText
()
protected
commandRotateVideo
()
protected
commandSaveGame
()
protected
commandSavePersistentData
()
protected
commandSaveSettings
()
protected
commandScreenEffect
()
protected
commandScreenTransition
()
protected
commandScript
()
protected
commandScrollBackground
()
protected
commandScrollBackgroundPath
()
protected
commandScrollBackgroundTo
()
protected
commandSetGameData
()
protected
commandSetMessageArea
()
protected
commandSetObjectData
()
protected
commandSetTargetMessage
()
protected
commandShakeBackground
()
protected
commandShakeCharacter
()
protected
commandShakePicture
()
protected
commandShakeScreen
()
protected
commandShowChoice
()
protected
commandShowChoices
()
protected
commandShowImageMap
()
protected
commandShowMessage
()
protected
commandShowMessageNVL
()
protected
commandShowPicture
()
protected
commandShowText
()
protected
commandShowVideo
()
protected
commandStartTimer
()
protected
Start Timer
commandStopMusic
()
protected
commandStopSound
()
protected
commandStopTimer
()
protected
Stop Timer
commandSwitchToLayout
()
protected
commandTextEffect
()
protected
commandTextMotionBlur
()
protected
commandTintBackground
()
protected
commandTintCharacter
()
protected
commandTintPicture
()
protected
commandTintScreen
()
protected
commandTintVideo
()
protected
commandUIAccess
()
protected
commandUnlockCG
()
protected
commandVideoDefaults
()
protected
commandVideoEffect
()
protected
commandVideoMotionBlur
()
protected
commandWait
()
protected
Wait
commandWaitForInput
()
protected
commandZoomBackground
()
protected
commandZoomCharacter
()
protected
commandZoomPicture
()
protected
commandZoomScreen
()
protected
commandZoomText
()
protected
commandZoomVideo
()
protected
compare
-
a
-
b
-
operation
Compares two object using the specified operation and returns the result.
Parameters:
-
a
Object- Object A.
-
b
Object- Object B.
-
operation
Number- The compare-operation to compare Object A with Object B.
- 0 = Equal To
- 1 = Not Equal To
- 2 = Greater Than
- 3 = Greater or Equal To
- 4 = Less Than
- 5 = Less or Equal To
Returns:
The comparison result.
cropObject
-
object
-
A
Cropes a game object.
Parameters:
-
object
gs.Object_Base- The game object to crop.
-
A
Objectparams object containing additional info.
dispose
()
Disposes the interpreter.
durationValueOf
-
object
It does the same like numberValueOf with one difference: If the specified object is a variable, it's value is considered as a duration-value in milliseconds and automatically converted into frames.
Parameters:
-
object
Number | Object- A number variable or constant number value.
Returns:
The value of the variable.
eraseObject
-
object
Erases a game object.
Parameters:
-
object
gs.Object_Base- The game object to erase.
Returns:
A params object containing additional info.
executeAction
-
action
-
stateValue
-
bindValue
Executes an action like for a hotspot.
Parameters:
-
action
Object- Action-Data.
-
stateValue
Boolean- In case of switch-binding, the switch is set to this value.
-
bindValue
Number- A number value which be put into the action's bind-value variable.
executeCommand
()
Executes the command at the specified index and increases the command-pointer.
flashObject
-
object
-
A
Flashes a game object.
Parameters:
-
object
gs.Object_Base- The game object to flash.
-
A
Objectparams object containing additional info.
isInputDataCommand
-
pointer
-
commands
Checks if the command at the specified pointer-index asks for user-input like the Input Number or Input Text command.
Parameters:
-
pointer
Number- The pointer/index.
-
commands
Object- The list of commands to check.
Returns:
true if its an input-data command. Otherwise false
isMessageCommand
-
pointer
-
commands
Checks if the command at the specified pointer-index is a game message related command.
Parameters:
-
pointer
Number- The pointer/index.
-
commands
Object- The list of commands to check.
Returns:
true if its a game message related command. Otherwise false.
isProcessingMessageInOtherContext
()
Boolean
Checks if a game message is currently running by another interpreter like a common-event interpreter.
Returns:
true a game message is running in another context. Otherwise false
jumpToLabel
()
listObjectOf
-
object
Gets the value of a (possible) list variable.
Parameters:
-
object
Object- A list variable.
Returns:
The value of the list variable.
maskObject
-
object
-
A
Executes a masking-effect on a game object..
Parameters:
-
object
gs.Object_Base- The game object to execute a masking-effect on.
-
A
Objectparams object containing additional info.
messageBoxObject
()
gs.Object_Base
protected
Gets the current message box object depending on game mode (ADV or NVL).
Returns:
The message box object.
messageObject
()
ui.Object_Message
protected
Gets the current message object depending on game mode (ADV or NVL).
Returns:
The message object.
messageObjectADV
()
ui.Object_Message
Gets the game message for adventure-mode.
Returns:
The ADV game message object.
messageObjectId
()
String
protected
Gets the current message ID depending on game mode (ADV or NVL).
Returns:
The message object ID.
messageObjectNVL
()
ui.Object_Message
Gets the game message for novel-mode.
Returns:
The NVL game message object.
messageSettings
()
Object
protected
Gets the current message settings.
Returns:
The message settings
moveObject
-
object
-
position
-
A
Moves a game object.
Parameters:
-
object
gs.Object_Base- The game object to move.
-
position
gs.Point- The position to move the game object to.
-
A
Objectparams object containing additional info.
moveObjectPath
-
object
-
path
-
A
Moves a game object along a path.
Parameters:
-
object
gs.Object_Base- The game object to move.
-
path
Object- The path to move the game object along.
-
A
Objectparams object containing additional info.
numberValueAtIndex
-
scope
-
index
Gets the value the number variable at the specified index.
Parameters:
-
scope
Number- The variable's scope.
-
index
Number- The index of the variable to get the value from.
Returns:
The value of the variable.
numberValueOf
-
object
Gets the value of a (possible) number variable. If a constant number value is specified, this method does nothing an just returns that constant value. That's to make it more comfortable to just pass a value which can be calculated by variable but also be just a constant value.
Parameters:
-
object
Number | Object- A number variable or constant number value.
Returns:
The value of the variable.
objectEffect
-
object
-
A
Enables an effect on a game object.
Parameters:
-
object
gs.Object_Base- The game object to execute a masking-effect on.
-
A
Objectparams object containing additional info.
objectMotionBlur
-
object
-
A
Sets the motion blur settings of a game object.
Parameters:
-
object
gs.Object_Base- The game object to set the motion blur settings for.
-
A
Objectparams object containing additional info.
onCallSceneFinish
-
sender
Called when a scene call finished execution.
Parameters:
-
sender
Object- The sender of this event.
onChoiceAccept
()
Object
protected
Called after a choice was selected by the user. It jumps to the corresponding label and also puts the choice into backlog.
Returns:
Event Object containing additional data like the label, etc.
onCommonEventFinish
()
Object
protected
Called when a common event finished execution.
Returns:
Event Object containing additional data.
onInputNumberFinish
()
Object
protected
Called after an input number dialog was accepted by the user. It takes the user's input and puts it in the configured number variable.
Returns:
Event Object containing additional data like the number, etc.
onInputTextFinish
()
Object
protected
Called after an input text dialog was accepted by the user. It takes the user's text input and puts it in the configured string variable.
Returns:
Event Object containing additional data like the text, etc.
onJumpTo
()
Object
protected
Called when a hotspot/image-map sends a "jumpTo" event to let the interpreter jump to the position defined in the event object.
Returns:
Event Object containing additional data.
onJumpTo
()
Object
protected
Called when a hotspot/image-map sends a "callCommonEvent" event to let the interpreter call the common event defined in the event object.
Returns:
Event Object containing additional data.
onMessageADVClear
()
Object
protected
Called when an ADV message finished clear.
Returns:
Event Object containing additional data.
onMessageADVDisappear
()
Object
protected
Called when an ADV message finished fade-out.
Returns:
Event Object containing additional data.
onMessageADVWaiting
()
Object
protected
Called when a ADV message finished rendering and is now waiting for the user/autom-message timer to proceed.
Returns:
Event Object containing additional data.
onMessageNVLFinish
()
Object
protected
Called when a ADV message finishes.
Returns:
Event Object containing additional data.
onMessageNVLFinish
()
Object
protected
Called when a NVL message finishes.
Returns:
Event Object containing additional data.
predefinedObjectPosition
-
position
-
object
-
params
Gets a position ({x, y}) for the specified predefined object position configured in Database - System.
Parameters:
-
position
Number- The index/ID of the predefined object position to set.
-
object
gs.Object_Base- The game object to set the position for.
-
params
Object- The params object of the scene command.
Returns:
The position {x, y}.
preview
()
Previews the current scene at the specified pointer. This method is called from the VN Maker Scene-Editor if live-preview is enabled and the user clicked on a command.
restore
-
bundle-
Restores the interpreter from a data-bundle
Parameters:
-
bundle-
ObjectThe data-bundle.
resume
()
Resumes the interpreter
rotateObject
-
object
-
A
Rotates a game object.
Parameters:
-
object
gs.Object_Base- The game object to rotate.
-
A
Objectparams object containing additional info.
scrollObjectPath
-
object
-
path
-
A
Scrolls a scrollable game object along a path.
Parameters:
-
object
gs.Object_Base- The game object to scroll.
-
path
Object- The path to scroll the game object along.
-
A
Objectparams object containing additional info.
setBooleanValueAtIndex
-
scope
-
index
-
value
Sets the value of a number variable at the specified index.
Parameters:
-
scope
Number- The variable's scope.
-
index
Number- The index of the variable to set.
-
value
Boolean- The boolean value to set the variable to.
setBooleanValueTo
-
variable
-
value
Sets the value of a boolean/switch variable.
Parameters:
-
variable
Object- The variable to set.
-
value
Boolean- The boolean value to set the variable to.
setListObjectTo
-
variable
-
value
Sets the value of a list variable.
Parameters:
-
variable
Object- The variable to set.
-
value
Object- The list object to set the variable to.
setNumberValueAtIndex
-
scope
-
index
-
value
Sets the value of a number variable at the specified index.
Parameters:
-
scope
Number- The variable's scope.
-
index
Number- The index of the variable to set.
-
value
Number- The number value to set the variable to.
setNumberValueTo
-
variable
-
value
Sets the value of a number variable.
Parameters:
-
variable
Number- The variable to set.
-
value
Number- The number value to set the variable to.
setStringValueAtIndex
-
scope
-
index
-
value
Sets the value of the string variable at the specified index.
Parameters:
-
scope
Number- The variable scope.
-
index
Number- The variable's index.
-
value
String- The value to set.
setStringValueTo
-
variable
-
value
Sets the value of a string/text variable.
Parameters:
-
variable
Object- The variable to set.
-
value
String- The string/text value to set the variable to.
setup
()
Sets up the interpreter.
shakeObject
-
object
Shakes a game object.
Parameters:
-
object
gs.Object_Base- The game object to shake.
Returns:
A params object containing additional info about the shake-animation.
showObject
-
object
-
position
-
A
Shows a game object on screen.
Parameters:
-
object
gs.Object_Base- The game object to show.
-
position
gs.Point- The position where the game object should be shown.
-
A
Objectparams object containing additional info.
skip
-
indent
-
backward
Skips all commands until a command with the specified indent-level is found. So for example: To jump from a Condition-Command to the next Else-Command just pass the indent-level of the Condition/Else command.
Parameters:
-
indent
Number- The indent-level.
-
backward
Boolean- If true the skip runs backward.
start
()
Starts the interpreter
stop
()
Stops the interpreter
storeListValue
-
id
-
parameters
-
wait
Calls a common event and returns the sub-interpreter for it.
Parameters:
-
id
Number- The ID of the common event to call.
-
parameters
Object- Optional common event parameters.
-
wait
Boolean- Indicates if the interpreter should be stay in waiting-mode even if the sub-interpreter is finished.
stringValueAtIndex
-
scope
-
index
Gets the value of the string variable at the specified index.
Parameters:
-
scope
Number- The variable's scope.
-
index
Number- The index of the variable to get the value from.
Returns:
The value of the variable.
stringValueOf
-
object
Gets the value of a (possible) string variable. If a constant string value is specified, this method does nothing an just returns that constant value. That's to make it more comfortable to just pass a value which can be calculated by variable but also be just a constant value.
Parameters:
-
object
String | Object- A string variable or constant string value.
Returns:
The value of the variable.
targetMessage
()
ui.Object_Message
protected
Gets the current target message object where all message commands are executed on.
Returns:
The target message object.
targetMessageBox
()
ui.Object_UIElement
protected
Gets the current target message box containing the current target message.
Returns:
The target message box.
tintObject
-
object
-
A
Tints a game object.
Parameters:
-
object
gs.Object_Base- The game object to tint.
-
A
Objectparams object containing additional info.
toDataBundle
()
Object
Serializes the interpreter into a data-bundle.
Returns:
The data-bundle.
update
()
Updates the interpreter and executes all commands until the next wait is triggered by a command. So in the case of an endless-loop the method will never return.
wait
-
time
-
callback
Halts the interpreter for the specified amount of time. An optionally callback function can be passed which is called when the time is up.
Parameters:
-
time
Number- The time to wait
-
callback
gs.Callback- Called if the wait time is up.
waitForCompletion
-
object
Lets the interpreter wait for the completion of a running operation like an animation, etc.
Parameters:
-
object
gs.Object_Base- The game object the operation is executed on. Can be null.
Returns:
A params object containing additional info.
waitForMessage
()
Boolean
If a game message is currently running by an other interpreter like a common-event interpreter, this method trigger a wait until the other interpreter is finished with the game message.
Returns:
true a game message is running in another context. Otherwise false
zoomObject
-
object
-
A
Zooms/Scales a game object.
Parameters:
-
object
gs.Object_Base- The game object to zoom.
-
A
Objectparams object containing additional info.
Properties
conditions
Number
protected
Stores states of conditions.
context
gs.InterpreterContext
protected
The execution context of the interpreter.
graphicAnchorPointsByConstant
gs.Point
protected
Mapping table to quickly get the anchor point for the an inserted anchor-point constant such as Top-Left(0), Top(1), Top-Right(2) and so on.
indent
Number
protected
Current indent-level of execution
isRunning
Boolean
Indicates if the interpreter is currently running.
isWaiting
Boolean
Indicates if the interpreter is currently waiting.
isWaitingForMessage
Boolean
Indicates if the interpreter is currently waiting until a message processed by another context like a Common Event is finished. FIXME: Conflict handling can be removed maybe.
loops
Number
protected
Stores states of loops.
pointer
Number
Index to the next command to execute.
previewData
Object
protected
Stores Live-Preview related info passed from the VN Maker editor like the command-index the player clicked on, etc.
previewInfo
Boolean
protected
Stores internal preview-info if the game runs currently in Live-Preview.
- previewInfo.timeout - Timer ID if a timeout for live-preview was configured to exit the game loop after a certain amount of time.
- previewInfo.waiting - Indicates if Live-Preview is currently waiting for the next user-action. (Selecting another command, etc.)
- previewInfo.executedCommands - Counts the amount of executed commands since the last interpreter-pause(waiting, etc.). If its more than 500, the interpreter will automatically pause for 1 frame to avoid that Live-Preview freezes the Editor in case of endless loops.
repeat
Boolean
Indicates if the interpreter automatically repeats execution after the last command was executed.
settings
Object
protected
Stores interpreter related settings like how to handle messages, etc.
subInterpreter
gs.Component_CommandInterpreter
protected
Sub-Interpreter from a Common Event Call. The interpreter will wait until the sub-interpreter is done and set back to null.
waitCounter
Number
Wait-Counter in frames. If greater than 0, the interpreter will for that amount of frames before continue.
waitingFor
Object
protected
Stores information about for what the interpreter is currently waiting for like for a ADV message, etc. to restore probably when loaded from a save-game.