Hello there. I am Dandre and I am trying to create a text based game called Token Ino with Squiffy. The current problems I have been having has been using javascript to create a random number with the following psudeo code.
var randomnumber = function rng(min, max) {
return Math.random() * (max - min) + min;
}
I am not sure if I am doing something wrong because if I try to call {randomnumber} or reference it in a if then statement it doesnt show a number or the vaule is equal with null. I simply want a variable that is randomly generatored. :) Also if it isnt too hard to implent is it possible for me to have chance in Squiffy implented in any kind of way using javascript? Imagine if you had a var 1 = 2 and with var 1 being to that increases your chances of succuding by 60 percent. This could also be used in the 'combat' system I am working on.