I figure I need to include another library to my game, but I don't know which one I need to add, in order to be able to use the function Rand(). I need it to produce an integer number, for a switch statement, where the integer number is used to determine which key in the switch to use.

Anyone know which library is needed?

The Pixie

There is a built in function GetRandomInt:


Thanks, appreciate knowing about it. Solves my issue.


here's the quest doc, for you to see what is already built-in for use:


doesn't cover everything...

in the GUI/Editor, in the bottom-left corner is:

filter -> show library elements -> (make sure this is toggled on) -> see below

what this toggle ('on') does, is to show all of the built-in stuff (look above, in the 'tree of stuff' on the left side, and now there will be light grey text, this is all of the built-in stuff that was hidden when the toggle was 'off'). By using this method, you're forced to 'copy' them, so you're NOT messing with the quest files and thus unable to break quest (but you can break your game file).

and lastly, you can always just open up the quest files themselves (in the quest folder), but don't mess with them unless you know what you're doing, as you'll break quest and have to remove quest and re-download/re-install it.

Log in to post a reply.