User Tools

Site Tools


Sidebar

Passage markup

basics

coding

extra

list

section

whitespace

Macros

basics

colour

data structure

date and time

game state

live

maths

number

revision

saving

showing and hiding

string

styling

url

deprecated

Types of data

Special keywords

Special passage tags

harlowe:random

(random: Number, [ Number ]) → Number

This macro produces a whole number randomly selected between the two whole numbers, inclusive (or, if the second number is absent, then between 0 and the first number, inclusive).

Example usage:

(random: 1,6) simulates a six-sided die roll.

See also:

harlowe/random.txt · Last modified: 2017/10/10 00:39 (external edit)