Loading ...
Sorry, an error occurred while loading the content.
 

a random value in an adjustment

Expand Messages
  • Mathias Gehl
    I have an item, where one of the adjustments, in certain cases, is a random number (specifically 1d10). How can I make the program evaluate the random number
    Message 1 of 2 , Jun 30 8:47 PM
      I have an item, where one of the adjustments, in certain cases, is a random
      number (specifically 1d10). How can I make the program evaluate the random
      number once, when the item is added, and then not change it again?

      Mathias Gehl
      mgehl@...
    • Bruce Kvam
      From the Help: *Evaluated Text Option Value* This might also be called the random option value. The text of the option is evaluated the first time the item
      Message 2 of 2 , Jul 3, 2006
        From the Help:

        Evaluated Text Option Value

        This might also be called the "random option" value. The text of the option is evaluated the first time the item is added. This is especially useful if you wish to generate random values for the option.
           ?@rand(6)
        
        This generates a random number from 1 to 6, which becomes the option value. A more complex example combines two option value types:
           text Sex ?@format('?:%d;Female;Male',rand(2))
        
        This creates a text option that is a list with two values, Female and Male, and randomly selects one when the item is added.

        Any expression is valid after the ?@.

        Mathias Gehl wrote:
        I have an item, where one of the adjustments, in certain cases, is a random
        number (specifically 1d10).  How can I make the program evaluate the random
        number once, when the item is added, and then not change it again?
          

      Your message has been successfully submitted and would be delivered to recipients shortly.