User Tools

Site Tools


random_number

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
random_number [2020/02/04 20:19] justinrandom_number [2020/05/26 10:35] (current) justin
Line 2: Line 2:
 ---- ----
  
-The **random number** syntax generates an integer value within the given range (inclusive of the minimum and maximum value). It can be used when assigning a value to a variable or as a function argument where a numeric value is expected.+The **random number** syntax generates an integer value within the given range (inclusive of the minimum and maximum value). It can be used in [[script|scripts]] anywhere [[number|numeric]] value is expected.
  
 ====Examples:==== ====Examples:====
Line 17: Line 17:
 end end
 </code> </code>
-Gives either ITEM_0001 or ITEM_0002 to the player, with a 25% chance that the item will be ITEM_0001.+Gives either ITEM_0001 or ITEM_0002 to the player, with a 25% chance that the [[item]] will be ITEM_0001.
  
 ~~NOTOC~~ ~~NOTOC~~
random_number.txt · Last modified: 2020/05/26 10:35 by justin