:: StoryTitle Limiting the range of a number in Harlowe :: Start Initialize the numeric variable to a value with the range you want. eg. between ''1'' and ''10'' inclusive. (note: You don't need to clamp anything at this point.)\ (set: $valueToClamp to 5) ''Current value'': $valueToClamp Increase the number to a value that is ''within'' the desired range. eg. Add 1 to the current value.\ (set: $valueToClamp to (min: $valueToClamp + 1, 10)) ''New value'': $valueToClamp Try to increase the number to a value that is ''outside'' the desired range. eg. Add 100 to the current value.\ (set: $valueToClamp to (min: $valueToClamp + 100, 10)) ''New value'': $valueToClamp Decrease the number to a value that is ''within'' the desired range. eg. Minus 5 from the current value.\ (set: $valueToClamp to (max: $valueToClamp - 5, 1)) ''New value'': $valueToClamp Try to decrease the number to a value that is ''outside'' the desired range. eg. Minus 100 from the current value.\ (set: $valueToClamp to (max: $valueToClamp - 100, 1)) ''New value'': $valueToClamp If you don't know whether the number will be added to or subtracted from, you can use both macros at once. eg. Either add or subtract 10 from the current value from the current value.\ (set: $valueToClamp to (min: (max: $valueToClamp + (either: 10, -10), 1), 10)) ''New value'': $valueToClamp