howdee.
how do i set a variable to be random between 1 to another variable
thank you
how do i set a variable to be random between 1 to another variable
thank you
Math.randomInt(1, $gameVariables.value(VARIABLE_ID));
// where VARIABLE_ID is the id of the variable you're looking to use as an upper limit.
Math.randomInt(min, max) is an extension method provided by RMMZ's core codebase, but I'm not 100% sure if it is usable in script commands and the like.Only a small correction:
Original thread: https://forums.rpgmakerweb.com/threads/question-about-variables.149042/