Skip to content

Triggers

Mence edited this page Jul 12, 2022 · 16 revisions
- WARNING: WIKI UNDER HEAVY CONSTRUCTION - UPDATES DONE WEEKLY

Triggers Manual

MANUAL

This is the manual for map maker containing ALL available triggers to be used on the game and scripts for run-time testing.

CONTACT

boltcraftgame@gmail.com

VERSION 1.00

Summary

stats
value-condition
player-id
game-event
alliance
add
attribute
menu-name
shapes

initialization
unit-kill
unit-cast-ability
unit-use-item
region-between-units
distance-between-units
dialog-box-close

game-event-check
get-game-event
unit-check-target
unit-check-stats
unit-check-target-ability-hotkey
unit-check-used-item
dialog-box-option

game-event-change
set-game-context
system-sleep
trigger-reset
spawn-unit
unit-edit-status
unit-edit-exp
unit-pause
unit-unpause
unit-teleport
unit-kill
unit-change-name
unit-cast-skill
unit-intelligence-range-min-change
camera-move-unit
camera-lock-hero
add-skill
add-passive
disable-skill
remove-all-skill-all
spawn-item
item-remove
spawn-merchant
merchant-remove
text-dialog
text-message-box
text-dialog-box
menu-show
add-gold-all-players
set-gold-all-players
add-special-effect

Keywords

stats

health health-max health-regeneration health-regeneration-per-level missing-health energy energy-max energy-regeneration energy-regeneration-per-level missing-energy shield shield-max shield-regeneration physical-armor magical-armor tenacity movement-speed-bonus attribute

value-condition

equal greater greater-or-equal lower lower-or-equal

== > >= < <=

player-id

1 - Player 2 - Enemy

game-event

0 = Menu 1 = Stage 2 = Loading 4 = Cinematic

alliance

ally enemy neutral

add

If [add] == true then the status value will be sum to the stat current value. Otherwise the value will be SET, overwriting the current value.

attribute

if [attribute] == true then all the incoming [stats] will become attributes name instead of stats.

menu-name

main menu pause game-over credits loading intro

shapes

shape-rectangle shape-circle

Events


initialization

"event": "initialization"

Description: Triggers at the stage start.


unit-kill

"event": "unit-kill", "unitName": "[target]"

Description: Triggers when the [target] dies.


unit-cast-ability

"event": "unit-cast-ability"

Description: Triggers when any unit casts an ability and load the unit data in the memory for further use.


unit-use-item

"event": "unit-use-item"

Description: Triggers when any unit uses an active ITEM and load the unit data in the memory for further use.


region-between-units

"event": "region-between-units", "floatValue": [range], "unitName": "[target]"

Description: Triggers when someone approaches from the [target], the distance between the units must be lower or equal to [range].


distance-between-units

"event": "distance-between-units", "floatValue": [range], "unitName": "[target]"

Description: Triggers when someone gets far away from the [target], the distance between the units must be greater or equal to [range].


dialog-box-close

"event": "dialog-box-close"

Description: Triggers when an option of dialog box is chosen, it doesn't work with dialog box without any option.

Conditions


game-event-check

"condition": "game-event-check", "integerValue": [game-event]

Keywords: game-event

Description: Check the current game event.


get-game-context

"condition": "get-game-context", "strings": [{"value": "[game-context]"}], "booleans": [{"value": [boolean]}]

Default values: [boolean]: True

Description: Check the current game context name are equal [game-context], the [logic] variable can be used to invert the condition requirement.


unit-check-target

"condition": "unit-check-target", "unitName": "[target]"

Description: Check the event target is equal to [target].


unit-check-stats

"condition": "unit-check-stats", "strings": [{"value": "[stats]"}, {"value": "[value-condition]"}, {"value": "[attribute]"}], "floats": [{"value": [value]}

Default values: [attribute]: ""

Keywords: stats value-condition

Description: Check if the event target selected [status] is [value-condition] [value].

If the [attribute] field isn't empty and [stats] == "attribute", the system will search for a custom attribute instead of basic status.


unit-check-target-ability-hotkey

"condition": "unit-check-target-ability-hotkey", "integers": [{"value": [hotkey]}]

Description: Check if the hotkey of event target last used ability is equal to [hotkey].


unit-check-used-item

"condition": "unit-check-used-item", "strings": [{"value": "[item]"}]

Description: Check if the name of event target last used item is equal to [item].


dialog-box-option

"condition": "dialog-box-option", "integers": [{"value": [dialog-id]}, {"value": [dialog-option-index]}]

Description: Check the dialog box option selected.

Actions


game-event-change

"action" : "game-event-change", "integerValue": [game-event]

Keywords: game-event

Description: Change the current game event.


set-game-context

"action" : "set-game-context", "strings": [{"value" : "[game-context]"}]

Description: Change the current game context.


system-sleep

"action" : "system-sleep", "floatValue": [time]

Description: Make the current running script wait [time] second(s).


trigger-reset

"action" : "trigger-reset"

Description: Make the entire trigger able to be activated again.


spawn-unit

"action" : "spawn-unit", "integers": [{"value": [position-x]}, {"value": [position-y]}, {"value": [group]}], "strings": [{"value" : "[unit-type]"}, {"value": "[alliance]"}, {"value": "[unit-name], {"value": "[item-drop]"}], "booleans": [{"value": [summoned]}]

Default values: [summoned]: False [item-drop]: "" [group]: 0

Keywords: alliance

Description: Creates a unit at position x,y.

[unit-type] must inform the character path i.e.: {value: "characters/dummy"}

[item-drop] must inform the item path i.e.: {value: "items/power-ups/gold-coin"}


unit-edit-status

{"action" : "unit-edit-status", "strings": [{"value" : "[unit-name]"}, {"value" : "[stats]"}], "floats": [{"value": [value]}], "booleans": [{"value": [attribute]}, {"value": [add]}]}

Keywords: stats attribute add

Description: Change the current stats of [unit-name] to [value].

Could set multiples stats / attributes at once. The string list index 0 will be always the [unit-name] and the (float list index).value will be always equal to (string list index + 1).value.

Negative values allowed.


unit-edit-exp

"action" : "unit-edit-exp", "strings": [{"value" : "[unit-name]"}], "integers": [{"value": [value]}], "booleans": [{"value": [add]}]

Keywords: add

Description: Change the [unit-name] experience points to [value].


unit-pause

"action" : "unit-pause", "floats": [{"value" : [value]}], "strings": [{"value" : "[unit-name]"}]

Description: Pauses the [unit-name] for [value] second(s).


unit-unpause

"action" : "unit-unpause", "strings": [{"value" : "[unit-name]"}]

Description: Set the [unit-name] pause time to 0.


unit-teleport

"action" : "unit-teleport", "strings": [{"value" : "[unit-name]"}], "floats": [{"value" : [position-x]}, {"value" : [position-y]}]

Description: Teleports the [unit-name] to position equal [position-x], [position-y].


unit-kill(action)

"action" : "unit-kill", "strings": [{"value" : "[unit-name]"}]

Description: Kills the [unit-name].


unit-change-name

"action" : "unit-change-name", "strings": [{"value" : "[unit-name]"}, {"value" : "[unit-new-name]"}]

Description: Change the [unit-name] name to [unit-new-name].


unit-cast-skill

"action" : "unit-cast-skill", "strings": [{"value" : "[unit-name]"}, {"value" : "[unit-name-target]"}, {"value": "[ability]"}, {"value": "[animation-name]"}

Default values: [animation-name] = ""

Description: The [unit-name] casts the [ability] at [unit-name-target] position using [animation-name] animation.


unit-intelligence-range-min-change

"action" : "unit-intelligence-range-min-change", "unitName": "[unit-name]", "floatValue": [range]

Description: Change the [unit-name] minimum range to attack someone to [range].


camera-move-unit

"action" : "camera-move-unit", "unitName": "[unit-name]"

Description: Move the player's camera to the [unit-name].


camera-lock-hero

"action" : "camera-lock-hero", "activated": [boolean]

Description: Set the camera locked to hero as [boolean].


add-skill

"action" : "add-skill", "strings": [{"value" : "[unit-name]"}, {"value": "[skill]"}]

Description: Add the [skill] to [unit-name].

Multiples abilities can be added at once.

The [skill] path must be i.e.: "linear/firebomb"


add-passive

"action" : "add-passive", "strings": [{"value" : "[unit-name]"}, {"value": "[passive]"}]

Description: Add the [passive] to [unit-name].

Multiples passives can be added at once.

The [passive] path must be i.e.: "thornmail"


disable-skill

"action" : "disable-skill", "strings": [{"value" : "[unit-name]"}, {"value": "[skill]"}]

Description: Disable the [skill] of [unit-name].

The [skill] path must be i.e.: "firebomb"


remove-skill-all

"action" : "remove-skill-all", "strings": [{"value" : "[unit-name]"}]

Description: Remove all skills of [unit-name].


"action" : "remove-passive-all", "strings": [{"value" : "[unit-name]"}]

Description: Remove all passives of [unit-name].


spawn-item

"action" : "spawn-item", "unitName": "[unit-name]", "strings": [{"value" : "[item]"}], "floats": [{"value": [position-x]}, {"value": [position-y]}]

Default values: [unit-name]: "" [position-x]: -1 [position-y]: -1

Description: Creates the [item] at [unit-name] position or [position-x], [position-y] position.

The [item] path must be like i.e.: "items/permanents/anska-helmet"


spawn-item

"action" : "spawn-item", "strings": [{"value" : "[item]"}]

Description: Remove the [item] from the stage, it can be picked or not.


spawn-merchant

"action" : "spawn-merchant", "integers": [{"value": [position-x]}, {"value": [position-y]}], "strings": [{"value" : "[merchant]"}]}

Description: Spawn the [merchant] type at [position-x], [position-y].

The [merchant] path must be like i.e.: "merchants/stores/ability/store-tutorial"


merchant-remove

"action" : "merchant-remove", "strings": [{"value": "[merchant-name]"}]

Description: Remove the merchant on the map equal [merchant-name].

The [merchant-name] must be like i.e.: "store-passive"


text-dialog

"action" : "text-dialog", "unitName": "[unit-name]", "strings": [{"value" : "[hud-character]"}, {"value" : "[hud-character-quote]"}, {"value" : "[special-option]"}]

Default values: [special-option]: ""

Description: Creates an unit dialog on the game.

If [special-option] is equal to "USE-DIALOGBOX" it will create a cinematic dialog-box. Otherwise it will be a floating text instead.

The [hud-character] field should be like i.e.: "BLACK-KNIGHT" The [hud-character-quote] field should be like i.e.: "WELCOME"


text-messagebox

"action" : "text-messagebox", "strings": [{"value" : "[hud-title-group]"}, {"value" : "[hud-title]"}, {"value" : "[hud-description-group]"}, {"value" : "[hud-description]"}, {"value" : "[hud-icon]"]

or

"action" : "text-messagebox", "strings": [{"value" : "[hud-title]"}, {"value" : "[hud-description]"}, {"value" : "[hud-icon]"]

Default values: [hud-icon]: ""

Description: Creates a message box to alert or inform the user about something.

The [hud-icon] path should be like i.e.: "icon/item/coin"

Example of usage: "strings": [{"value" : "MAIN-MENU"}, {"value" : "INFO-CAPTION"}, {"value" : "HUD"}, {"value" : "INFO-NEW-ITEM-DESCRIPTION"}]


text-dialogbox

{"action" : "text-dialogbox", "integers": [{"value" : [dialog-id]}], "strings": [{"value" : "[unit-name]"}, {"value" : "[hud-title-group]"}, {"value" : "[hud-title]"}, {"value" : "[hud-description-group]"}, {"value" : "[hud-description]"}]}

Description: Creates a dialog box changing the game to cinematic mode.

It also has possibility to add dialog options, and they can be caught using [dialog-id] tracking.


menu-show

"action" : "menu-show", "strings": [{"value" : "[menu-name]"}]

Keywords: menu-name

Description: Show the current [menu-name].


add-gold-all-players

"action" : "add-gold-all-players", "integerValue": [value]

Description: Add gold amount by [value] for all players.


set-gold-all-players

"action" : "set-gold-all-players", "integerValue": [value]

Description: Set the gold of all players by [value].


add-special-effect

"action" : "add-special-effect", "strings": [{"value": "[texture]/[shapes]"}, {"value": "[sound]"}, {"value": "[animation]"}, {"value": "[unit-name]"}], "integers": [{"value": [red]},{"value": [green]},{"value": [blue]},{"value": [alpha]}], "floats": [{"value": [position-x]}, {"value": [position-y]}, {"value": [angle]}, {"value": [scale]}, {"value": [duration]}, "value": [shape-width]}, "value": [shape-height]}], "booleans": [{"value": [behind]}, {"value": [fade]}, {"value": [limited-time]}, {"value": [hud-canvas]}]

Default values: [sound]: "" [unit-name]: "" [red]: 255 [green]: 255 [blue]: 255 [alpha]: 255 [angle]: 0.00 [scale]: 1.00 [duration]: 0.00 [shape-width]: 0.00 [shape-height]: 0.00 [behind]: false [fade]: false [limited-time]: false [hud-canvas]: false

Keywords: shapes

Description: Add the special effect at [position-x], [position-y] or at position of [unit-name].

If the [shapes] will be used as rectangle, the fields [shape-width] and [shape-height] cannot be empty or zero. If the [shapes] will be used as circle, the field [shape-width] cannot be empty or zero. if [limited-time] == true, the field [duration] cannot be empty or zero.

The [texture] model should be like i.e.: "interface/tutorial-bottom-pointer-hand"

Clone this wiki locally