Skip to content

Commit

Permalink
Adds ChatterboxNodeChangeCallback() docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JujuAdams committed Sep 12, 2024
1 parent ca9863b commit edf1b17
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/2.15/reference-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ _Returns:_ N/A (`undefined`)
|----------|--------|------------------------------------------|
|`function`|function|Function to execute when a variable is set|

Sets a callback functiojn that is executed whenever a Chatterbox variable is set. The callback will be executed in the following situations:
Sets a callback function that is executed whenever a Chatterbox variable is set. The callback will be executed in the following situations:

- Setting a variable in YarnScript

Expand Down
27 changes: 27 additions & 0 deletions docs/latest/reference-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,33 @@ Find-replace operations are applied to all source files on load. These operation

 

## `...NodeChangeCallback()`

_Full function name:_ `ChatterboxNodeChangeCallback(function)`

_Returns:_ N/A (`undefined`)

|Name |Datatype|Purpose |
|----------|--------|---------------------------------------------|
|`function`|function|Function to execute when moving between nodes|

Sets a callback function that is executed whenever a chatterbox changes node. The callback will be executed in the following situations:

- Jumping to a node

- Hopping to a node

- Hopping back to a node

The callback will be executed with the following arguments:

|Name |Datatype|Purpose |
|---------|--------|----------------------------------|
|`oldNode`|string |Name of the node that we have left|
|`newNode`|string |Name of the node we have entered |

 

## `...SourceNodeExists()`

_Full function name:_ `ChatterboxSourceNodeExists(sourceName, nodeTitle)`
Expand Down
2 changes: 1 addition & 1 deletion docs/latest/reference-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ _Returns:_ N/A (`undefined`)
|----------|--------|------------------------------------------|
|`function`|function|Function to execute when a variable is set|

Sets a callback functiojn that is executed whenever a Chatterbox variable is set. The callback will be executed in the following situations:
Sets a callback function that is executed whenever a Chatterbox variable is set. The callback will be executed in the following situations:

- Setting a variable in YarnScript

Expand Down

0 comments on commit edf1b17

Please sign in to comment.