Manage narration flow with labels
Describes how to control the narrative flow in Pixi’VN using labels, including call, jump, and close labels function.
The narration flow is managed by functions such as call, jump, continue, back, and closeLabel, all available in the narration object.
Run a label
ink
You can use this method with the ink syntax. See more here.
Continue and go back in steps
Continue
UI screen
You can find the example of the "continue" button in the interface examples section.
To execute the next step, use the narration.continue function.
import { narration } from "@drincs/pixi-vn";
await narration.continue({});narration.continue is asynchronous, so you can use .then to, for example, disable a "Next" button until the step is complete.
import { narration } from "@drincs/pixi-vn";
// disable next button
narration.continue({}).then((result) => {
// enable next button
});Go back
UI screen
You can find the example of the go back button in the interface examples section.
At every step, the system saves the current state of the game. To go back to the previous step, use the stepHistory.back function.