Narrat Docs
Search…
Add Stat
The add_stat function in narrat add a specified value to a HUD stat
The add_stat function in narrat add a specified value to a HUD stat
Syntax: add_stat [statId] [value]
See HUD Stats page for more info on this feature
Example:
1
choice:
2
talk shopkeeper idle "So, what do you want to buy?"
3
"I want to buy a little snack" $if this.stats.money > 5:
4
talk shopkeeper idle "Sure, that will be $5"
5
add_stat money -5
6
set data.hasSnack = true
7
"I want to buy a PS5 game" $if this.stats.money > 70:
8
talk shopkeeper idle "Sure, that will be $70"
9
add_stat money -70
10
set data.hasGame true
Copied!
Copy link