LogoPixi’VN
Other features

Functions

It is preferable to use hashtag commands to add custom functionality to your game, instead of defining custom functions. Hashtag commands are more flexible and integrate better with the game engine.

The ink + Pixi’VN integration allows the use of custom functions, but unlike native ink, these functions are defined in JavaScript and not in ink.

In fact, if you define a function in ink, it will be ignored by Pixi’VN. For example, the following function will have no effect:

file_type_ink
ink
=== function myfunction(x) === // ❌ This will be ignored  [!code warning]
~ return x * 2 // ❌ This will be ignored  [!code warning]

However, you can use the functions defined in StepLabelProps.

Warning: It is important to note that functions used in ink cannot have optional parameters.

=== start ===
Navigate to main menu screen
~ navigate("/") 
-> DONE