Description

Interpreter commands events

Usage

Constructor

  • event {Game_Character} optional

    (optional) Event concerned. If null, the interpreter to execute the player

  • commands {Array} optional

    (optional) Array containing the commands to be executed

Methods

getNextCommand

Get the next command from the command running

getPrevCommand

Get the previous command from the command running

getCurrentCommand

Get the command running

getCommand

Get an command depending on its position

assignCommands

Assigns commands

execCommands

Execute commands event

nextCommand

Execute the next command

commandsExit

Stop playback controls event

setCommand

(alias addCommand) Add (or change) a command of events. The command is a string. The command in the event must be of the form "name: json value" Example 1 : "FOO: {'bar': 'hello'}" Example 2 : "BAR: 10" Example 3 : "TEST: {'one': 5, 'two': [9, 5], 'three': {'a': 10, 'b': 'yep'}}" Note that single quotes are replaced by double quotes to have a valid JSON.

Discussion