Narrat Docs
Search…
⌃K
Narrat Docs
Search…
⌃K
Narrat
Functions Documentation
All commands list
Save Commands
String commands
Text Commands
Random Generation
Logical Operators
Math commands
Jump
Choice
Modifying variables
If
Left-side Viewport commands
Clear Dialog
Audio commands (music and sounds)
Wait
Skills Commands
Notify
Stats Commands
Text Field
Features
Quests
Transitions
Inventory
HUD Stats
Screens
Skills System
Saving and Reloading
Playing Audio
Functions
Guides
Getting Help
Language syntax and expressions
Using items
Updating narrat
Getting Started
Old Template method
Config files
Useful Links
Theming the game and UI
Installing Narrat in a web app
Editing a narrat game
Building and exporting your game
Publishing on Steam (Steamworks integration)
Examples
Example Config
Example narrat script
Powered By GitBook

Random Generation

Narrat has a few commands to generate numbers or choose random elements
  • random [min] [max]: Returns an integer between [min] and [max] (inclusive)
  • random_float [min] [max]: Returns a random float between [min] and [max]
  • random_from_args [arg1] [arg2] [arg3] ...: Returns a random element from the args passed. Args can be any value. Useful to select a random element from a list of possibilities
Previous
Think
Next - Functions Documentation
Logical Operators
Last modified 6mo ago
Copy link