Class: EventCommandIf

EventCommandIf

An event command for condition event command block

new EventCommandIf (command)

Name Type Description
command Object Direct JSON command to parse
Properties:
Name Type Description
hasElse boolean Indicate if there is an else node or not
kind number The kind of condition
variableParamProp SystemValue The variable param prop value
variableParamPropOperationKind OperationKind The variable param prop operation kind
variableParamPropValue SystemValue The variable param prop value
heroesSelection number The heroes selection
heroInstanceID SystemValue The hero instance ID value
heroesInTeam boolean Indicate if heroes in team selection
heroesInTeamSelection number The heroes in team selection
heroesKind number The kind of heroes
heroesNamed SystemValue The heroes name value
heroesInTeamValue number The heroes in team value
heroesSkillID SystemValue The heroes skill ID value
heroesEquipedKind number The heroes equiped kind
heroesEquipedWeaponID SystemValue The heroes equiped weapon ID
heroesEquipedArmorID SystemValue The heroes equiped armor ID
heroesStatusID SystemValue The heroes status ID
heroesStatisticID SystemValue The heroes statistic ID
heroesStatisticOperation OperationKind The heroes statistic kind operation
heroesStatisticValue SystemValue The heroes statistic value
currencyID SystemValue The currency ID value
operationCurrency OperationKind The currency operation kind
currencyValue SystemValue The currency value
itemID SystemValue The item ID value
operationItem OperationKind The item operation kind
itemValue SystemValue The item value
weaponID SystemValue The weapon ID value
operationWeapon OperationKind The weapon operation kind
weaponValue SystemValue The weapon value
weaponEquiped boolean Indicate if weapon is equiped
armorID SystemValue The armor ID value
operationArmor OperationKind The armor operation kind
armorValue SystemValue The armor value
armorEquiped boolean Indicate if armor is equiped
keyID SystemValue The key ID value
keyValue SystemValue The key value
script SystemValue The script value

Extends

Methods

allTheHeroes (tab, callback)boolean

Apply callback with all the heroes
Name Type Description
tab Array.<SystemHero> The heroes list
callback function The callback
Returns:
Type Description
boolean

noneOfTheHeroes (tab, callback)boolean

Apply callback with none of the heroes
Name Type Description
tab Array.<SystemHero> The heroes list
callback function The callback
Returns:
Type Description
boolean

atLeastOneHero (tab, callback)boolean

Apply callback with at least one hero
Name Type Description
tab Array.<SystemHero> The heroes list
callback function The callback
Returns:
Type Description
boolean

theHeroeWithInstanceID (tab, id, callback)boolean

Apply callback with the hero with instance ID
Name Type Description
tab Array.<SystemHero> The heroes list
id number The hero instance id
callback function The callback
Returns:
Type Description
boolean

getResult (tab, callback)boolean

Apply callback according to heroes selection
Name Type Description
tab Array.<SystemHero> The heroes list
callback function The callback
Returns:
Type Description
boolean

update (currentState, object, state)number overrides

Update and check if the event is finished
Name Type Description
currentState Object The current state of the event
object MapObject The current object reacting
state number The state ID
Returns:
Type Description
number The number of node to pass

goToNextCommand ()number

Returns the number of node to pass
Returns:
Type Description
number

initialize ()Object inherited overrides

Initialize the current state
Returns:
Type Description
Object The current state

onKeyPressed (currentState, key) inherited overrides

First key press handle for the current stack
Name Type Description
currentState Object The current state of the event
key number The key ID pressed

onKeyReleased (currentState, key) inherited overrides

First key release handle for the current stack
Name Type Description
currentState Object The current state of the event
key number The key ID pressed

onKeyPressedRepeat (currentState, key)boolean inherited overrides

Key pressed repeat handle for the current stack
Name Type Description
currentState Object The current state of the event
key number The key ID pressed
Returns:
Type Description
boolean

onKeyPressedAndRepeat (currentState, key) inherited overrides

Key pressed repeat handle for the current stack, but with a small wait after the first pressure (generally used for menus)
Name Type Description
currentState Object The current state of the event
key number The key ID pressed

drawHUD (currentState) inherited overrides

Draw the HUD
Name Type Description
currentState Object The current state of the event