Story Trigger Reference

Dolmexica Infinite, presented by Dogma 2018-2023

Documentation for release version (2023)

Updated 30 June 2023

Contents

About Story Triggers

This is an alphabetical index of function-type triggers for Dolmexica story state machines. For details on use of function-type triggers in expressions, see the expression documentation fom the original M.U.G.E.N documentation.

The root story instance can be accessed with root, the parent instance with parent, and helpers with helper(id).

For more information on triggers, check the original M.U.G.E.N trigger documentation. Unless otherwise specified, documentation style for Dolmexica story triggers follows the outlines presented in the original M.U.G.E.N trigger documentation.

Abs (math)

Same as original M.U.G.E.N trigger.

Acos (math)

Same as original M.U.G.E.N trigger.

Anim

Returns the action number of the animation.

Format:
Anim(id)
Arguments:
id
Anim identifier (int).
Return type:
int
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = Anim(5) = 200
  Triggers if animation 5 is currently in action 200.

Animtime

Return time until animation is over.

Format:
Animtime(id)
Arguments:
id
Anim identifier (int).
Return type:
int
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = Animtime(5) = 0
  Triggers if animation 5 is equal to the action's looptime, ie. the end of the action has been reached.

Asin (math)

Same as original M.U.G.E.N trigger.

Atan (math)

Same as original M.U.G.E.N trigger.

Ceil (math)

Same as original M.U.G.E.N trigger.

CharAnim

Return action number of character.

Format:
CharAnim(id)
Arguments:
id
Character identifier (int).
Return type:
int
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = CharAnim(5) = 20
  Triggers if character 5 is displaying action 20.

CharAnimTime

Return time until char animation is over.

Format:
CharAnimTime(id)
Arguments:
id
Character identifier (int).
Return type:
int
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = CharAnimTime(5) = 0
  Triggers if the action of character 5 is equal to the action's looptime, ie. the end of the action has been reached.

CharShadow

Returns true if character has a shadow.

Format:
CharShadow(id)
Arguments:
id
Character identifier (int).
Return type:
boolean int (1 or 0)
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = CharShadow(5) = 1
  Triggers if character 5 has a shadow.

CharStage

Returns true if character is part of stage camera coordinate system.

Format:
CharStage(id)
Arguments:
id
Character identifier (int).
Return type:
boolean int (1 or 0)
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = CharStage(5) = 1
  Triggers if character 5 is part of the stage camera coordinate system.

CharX

Return x position of character.

Format:
CharX(id)
Arguments:
id
Character identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = CharX(5) = 200
  Triggers if character 5 is at x position 200.

CharY

Return y position of character.

Format:
CharY(id)
Arguments:
id
Character identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = CharY(5) = 200
  Triggers if character 5 is at y position 200.

Concatenate

Concatenate two triggers as strings.

Format:
Concatenate(a, b)
Arguments:
a
Subtrigger 1 (string).
b
Subtrigger 2 (string).
Return type:
string
Error conditions:
Returns bottom if incorrect argument count.

Example:

text = Concatenate("Hello ", "World")
  Sets text variable to "Hello World".

Cos (math)

Same as original M.U.G.E.N trigger.

DisplayText

Return displayed text of text element, less than the full text while typewriter effect is active.

Format:
DisplayText(id)
Arguments:
id
Text identifier (int).
Return type:
string
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = DisplayText(5) = "Hey, what is goi"
  Triggers if text 5 is displaying "Hey, what is goi".

Exp (math)

Same as original M.U.G.E.N trigger.

Floor (math)

Same as original M.U.G.E.N trigger.

FVar

Same as original M.U.G.E.N trigger.

GlobalFVar

See GlobalFVar trigger documentation in new Dolmexica Infinite trigger documentation.

GlobalSVar

See GlobalSVar trigger documentation in new Dolmexica Infinite trigger documentation.

GlobalVar

See GlobalVar trigger documentation in new Dolmexica Infinite trigger documentation.

IfElse (math)

Same as original M.U.G.E.N trigger.

Log (math)

Same as original M.U.G.E.N trigger.

Loop

Returns true if animation is looping.

Format:
Loop(id)
Arguments:
id
Anim identifier (int).
Return type:
boolean int (1 or 0)
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = Loop(5) = 1
  Triggers if animation 5 is looping.

Ln (math)

Same as original M.U.G.E.N trigger.

NameId

Returns numerical id representation of alias string.

Format:
NameId(name)
Arguments:
name
Identifier alias (string).
Return type:
int
Error conditions:
Returns bottom if name is not an alias.

Example:

trigger1 = NameId(kfm) = 6
  Triggers if the alias kfm is set to represent numerical identifier 6.

NameText

Return name string of text element.

Format:
NameText(id)
Arguments:
id
Text identifier (int).
Return type:
string
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = NameText(5) = "Narrator"
  Triggers if text 5 is having "Narrator" set as its name.

NumHelper

Returns helper amount with id.

Format:
NumHelper(id)
Arguments:
id
Helper identifier (int).
Return type:
int
Error conditions:
none

Example:

trigger1 = NumHelper(10000) = 1
  Triggers if there exists a helper with id 10000.

ParentAnimTime

Return time until animation in parent is over.

Format:
ParentAnimTime(id)
Arguments:
id
Anim identifier (int).
Return type:
int
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = ParentAnimTime(5) = 0
  Triggers if animation 5 in parent is equal to the action's looptime, ie. the end of the action has been reached.

ParentCharAnim

Return action number of character in parent.

Format:
ParentCharAnim(id)
Arguments:
id
Character identifier (int).
Return type:
int
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = ParentCharAnim(5) = 20
  Triggers if character 5 in parent is displaying action 20.

ParentCharAnimTime

Return time until char animation in parent is over.

Format:
ParentCharAnimTime(id)
Arguments:
id
Character identifier (int).
Return type:
int
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = ParentCharAnimTime(5) = 0
  Triggers if the action of character 5 in parent is equal to the action's looptime, ie. the end of the action has been reached.

ParentCharX

Return x position of character in parent.

Format:
ParentCharX(id)
Arguments:
id
Character identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = ParentCharX(5) = 200
  Triggers if character 5 in parent is at x position 200.

ParentCharY

Return y position of character in parent.

Format:
ParentCharY(id)
Arguments:
id
Character identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = ParentCharY(5) = 200
  Triggers if character 5 in parent is at y position 200.

ParentFVar

FVar but from parent instance.

ParentSVar

SVar but from parent instance.

ParentTextVisible

Return visibility of text in parent.

Format:
ParentTextVisible(id)
Arguments:
id
Text identifier (int).
Return type:
boolean int (1 or 0)
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = ParentTextVisible(5) = 0
  Triggers if text 5 is not visible in parent.

ParentTextX

Return x position of text in parent.

Format:
ParentTextX(id)
Arguments:
id
Text identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = ParentTextX(5) = 200
  Triggers if text 5 in parent is at x position 200.

ParentTextY

Return y position of text in parent.

Format:
ParentTextY(id)
Arguments:
id
Text identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = ParentTextY(5) = 200
  Triggers if text 5 in parent is at y position 200.

ParentVar

Var but from parent instance.

ParentX

Return x position of anim in parent.

Format:
ParentX(id)
Arguments:
id
Anim identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = ParentX(5) = 200
  Triggers if animation 5 in parent is at x position 200.

ParentY

Return y position of anim in parent.

Format:
ParentY(id)
Arguments:
id
Anim identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = ParentY(5) = 200
  Triggers if animation 5 in parent is at y position 200.

Platform

See platform trigger documentation in new Dolmexica Infinite trigger documentation.

Random

Same as original M.U.G.E.N trigger.

RootAnimTime

Return time until animation in root is over.

Format:
RootAnimTime(id)
Arguments:
id
Anim identifier (int).
Return type:
int
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = RootAnimTime(5) = 0
  Triggers if animation 5 in root is equal to the action's looptime, ie. the end of the action has been reached.

RootCharAnim

Return action number of character in root.

Format:
RootCharAnim(id)
Arguments:
id
Character identifier (int).
Return type:
int
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = RootCharAnim(5) = 20
  Triggers if character 5 in root is displaying action 20.

RootCharAnimTime

Return time until char animation in root is over.

Format:
RootCharAnimTime(id)
Arguments:
id
Character identifier (int).
Return type:
int
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = RootCharAnimTime(5) = 0
  Triggers if the action of character 5 in root is equal to the action's looptime, ie. the end of the action has been reached.

RootCharX

Return x position of character in root.

Format:
RootCharX(id)
Arguments:
id
Character identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = RootCharX(5) = 200
  Triggers if character 5 in root is at x position 200.

RootCharY

Return y position of character in root.

Format:
RootCharY(id)
Arguments:
id
Character identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = RootCharY(5) = 200
  Triggers if character 5 in root is at y position 200.

RootFVar

FVar but from root instance.

RootSVar

SVar but from root instance.

RootTextVisible

Return visibility of text in root.

Format:
RootTextVisible(id)
Arguments:
id
Text identifier (int).
Return type:
boolean int (1 or 0)
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = RootTextVisible(5) = 0
  Triggers if text 5 is not visible in root.

RootTextX

Return x position of text in root.

Format:
RootTextX(id)
Arguments:
id
Text identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = RootTextX(5) = 200
  Triggers if text 5 in root is at x position 200.

RootTextY

Return y position of text in root.

Format:
RootTextY(id)
Arguments:
id
Text identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = RootTextY(5) = 200
  Triggers if text 5 in root is at y position 200.

RootVar

Var but from root instance.

RootX

Return x position of anim in root.

Format:
RootX(id)
Arguments:
id
Anim identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = RootX(5) = 200
  Triggers if animation 5 in root is at x position 200.

RootY

Return y position of anim in root.

Format:
RootY(id)
Arguments:
id
Anim identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = RootY(5) = 200
  Triggers if animation 5 in root is at y position 200.

ScreenCharX

Return x position of character on screen.

Format:
ScreenCharX(id)
Arguments:
id
Character identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = ScreenCharX(5) = 200
  Triggers if character 5 is at x position 200 on screen.

ScreenCharY

Return y position of character on screen.

Format:
ScreenCharY(id)
Arguments:
id
Character identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = ScreenCharY(5) = 200
  Triggers if character 5 is at y position 200 on screen.

ScreenX

Return x position of animation on screen.

Format:
ScreenX(id)
Arguments:
id
Anim identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = ScreenX(5) = 200
  Triggers if animation 5 is at x position 200 on screen.

ScreenY

Return y position of animation on screen.

Format:
ScreenY(id)
Arguments:
id
Anim identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = ScreenY(5) = 200
  Triggers if animation 5 is at y position 200 on screen.

Shadow

Returns true if animation has a shadow.

Format:
Shadow(id)
Arguments:
id
Anim identifier (int).
Return type:
boolean int (1 or 0)
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = Shadow(5) = 1
  Triggers if animation 5 has a shadow.

StageCharX

Return x position of character in stage coordinates.

Format:
StageCharX(id)
Arguments:
id
Character identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = StageCharX(5) = 200
  Triggers if character 5 is at x position 200 in stage coordinates.

StageCharY

Return y position of character in stage coordinates.

Format:
StageCharY(id)
Arguments:
id
Character identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a character.

Example:

trigger1 = StageCharY(5) = 200
  Triggers if character 5 is at y position 200 in stage coordinates.

StageX

Return x position of anim in stage coordinates.

Format:
StageX(id)
Arguments:
id
Anim identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = StageX(5) = 200
  Triggers if animation 5 is at x position 200 in stage coordinates.

StageY

Return y position of anim in stage coordinates.

Format:
StageY(id)
Arguments:
id
Anim identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = StageY(5) = 200
  Triggers if animation 5 is at y position 200 in stage coordinates.

StoryCommand

Same as original command M.U.G.E.N trigger. Uses commands from cmd file in storyboard header.

Sin (math)

Same as original M.U.G.E.N trigger.

Stage

Returns true if animation is part of the stage's camera coordinate system.

Format:
Stage(id)
Arguments:
id
Anim identifier (int).
Return type:
boolean int (1 or 0)
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = Stage(5) = 1
  Triggers if animation 5 is part of the stage's camera coordinate system.

SVar

Same as original M.U.G.E.N trigger, but for string variables.

Tan (math)

Same as original M.U.G.E.N trigger.

Text

Return full text of text element.

Format:
Text(id)
Arguments:
id
Text identifier (int).
Return type:
string
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = Text(5) = "Hey, what is going on?"
  Triggers if text 5 is "Hey, what is going on?".

TextBuiltup

Return true if typewriter effect is over and text is completely displayed.

Format:
TextBuiltup(id)
Arguments:
id
Text identifier (int).
Return type:
boolean int (1 or 0)
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = TextBuiltup(5) = 1
  Triggers if text 5 is completely displayed and typewriter effect is over.

TextNextState

Return next state parameter of text element.

Format:
TextNextState(id)
Arguments:
id
Text identifier (int).
Return type:
int
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = TextNextState(5) = 10
  Triggers if text 5 is set to switch to state 10 when completed.

TextVisible

Return visibility of text.

Format:
TextVisible(id)
Arguments:
id
Text identifier (int).
Return type:
boolean int (1 or 0)
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = TextVisible(5) = 0
  Triggers if text 5 is not visible.

TextX

Return x position of text.

Format:
TextX(id)
Arguments:
id
Text identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = TextX(5) = 200
  Triggers if text 5 is at x position 200.

TextY

Return y position of text.

Format:
TextY(id)
Arguments:
id
Text identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not a text.

Example:

trigger1 = TextY(5) = 200
  Triggers if text 5 is at y position 200.

Time

Return time passed since current state was entered.

Format:
Time
Arguments:
none
Return type:
int
Error conditions:
none

Example:

trigger1 = Time % 10 = 0
  Triggers on every 10th tick in a state.

Var

Same as original M.U.G.E.N trigger.

X

Return x position of anim.

Format:
X(id)
Arguments:
id
Anim identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = X(5) = 200
  Triggers if animation 5 is at x position 200.

Y

Return y position of anim.

Format:
Y(id)
Arguments:
id
Anim identifier (int).
Return type:
float
Error conditions:
Returns bottom if id is not an animation.

Example:

trigger1 = Y(5) = 200
  Triggers if animation 5 is at y position 200.