WatchNon-threaded

Forums » Advanced Editor Forum » Read Message

Talk about it. Ask for help on it. Compliment it.

Random variable question

6 years ago
Hi,
How do I make it so that a random number is picked between 7 and 20 in my storygame?

Random variable question

6 years ago

In the Scripting of the Link or Page or Item - just add the Variable that you want Randomized (such as) -

%NUMBER := 1D14 + 6

That will assign %NUMBER a value of 7-20

If you want to Add the Random Number to the Variable, rather than Replace its Value you would use:

%NUMBER := %NUMBER + 1D14 + 6

 

Random variable question

6 years ago
Note -

EDITED original above, to answer the 7-20 question (that I missed before) :)