-
-
Notifications
You must be signed in to change notification settings - Fork 2
ink variables
Black Ram edited this page Nov 14, 2024
·
6 revisions
As explained in the official documentation of the ink language:
ink also supports variables, both temporary and global, storing numerical and content data, or even story flow commands. It is fully-featured in terms of logic, and contains a few additional structures to help keep the often complex logic of a branching story better organised.
In the ink + Pixi’VN integration, the variables VAR
and CONST
are equivalent to variables in storage. And the variables temp
are equivalent to temporary variables in storage.
The name of the variables of ink they are corresponding to the key of the variables in the storage. So For example, if you have the following ink code:
VAR myVariable = 42
You can access the variable myVariable
in the storage with the following code:
import { storage } from '@drincs/pixi-vn'
const myVariable = storage.getVariable<number>("myVariable");