Flags management
Explains how to use boolean flags in Pixi’VN to control game flow.
Pixi’VN provides functions to manage "game flags". Game flags are boolean values used to control the flow of the game or to store other boolean value in the game storage.
This mechanic has much less impact on save size than using the normal storage, so it is recommended to use flags for boolean values that are frequently changed.
Set
To set a flag, use the storage.flags.set function.
import { storage } from "@drincs/pixi-vn";
storage.flags.set("flag1", true);Get
To get a flag, use the storage.flags.get function.
import { storage } from "@drincs/pixi-vn";
const flag1 = storage.flags.get("flag1");