Random variable question

If I make a variable that chooses randomly from 1-10 for one event, could I use that same variable on a completely different event from 1-10? (Or whatever number I choose?)

Meaning I could have one variable in my list of variables, where so long as it is always used for random, I could choose whatever range I want without running into any future errors or problems?

I'm still a little unsure on this but I think the answer is yes...(Hopefully I make sense?)
Thanks for reading.
it can work if you use it and when you call the variable = 0
from the start, you can use it over an over, unless the variable
stays at a number for the choice or page number to run, than
it doesn't work.

for pure random number 0...n it works if the choice is a 1x selection.
you need to think twice, or use 2 or more if required.

the way I use it, I dont have much problems for randomizing, specially
for random loot from chest for 1 example.
each and every variable is set at the moment you use the control variable command, and keeps that number until you use a different control variable on the same variable ID.

what that is doesn't matter at all - you can use random 1-10 on one event, then player screen x on the next event and whatever else on the following commands.

you just need to remember that the last value is only kept until the next command is used.
whether that command is in the same or other events also doesn't matter

so yes, you can declare some variables for temp uses and overwrite them whenever you want, as long as you never expect it to still contain any value from the last use before the current control variable

Original thread: https://forums.rpgmakerweb.com/threads/random-variable-question.166662/