Is there a way in Inform 6 to generate a number between two other numbers? Like, upon the game’s start I want the time to be anywhere between 7 AM and 8 AM, but don’t want to have to type out “SetTime(random(420, 421, 422…blah blah blah until I get to 480), 1)”. This isn’t mentioned in the Designer’s Manual and can’t seem to find anything on the topic anywhere else. Surely it can be done though, right?
Something like this? (not tested, as I’m at work)
[ rndBetween first second; return random(first) + (second-first); ];
EDIT: should probably be random(first+1) + (second-first)-1; since Inform 6 randomizes from 1 to n.