I've been trying to get something to work, while learning js in parallel, but it seems (to me) that I am missing some syntax particular to RM, so I thought I'd just come out and ask.
I need
if( (variable1 mod (2^(variable2)) < 2^(variable2 - 1)) {} which is obviously too complex for the non-script conditional branch options.
I understand I need to use
$gameVariables
and while I can see on the script calls spreadsheet I can change a variable by using $gameVariables.setValue(var,value);
I have no idea how to "getValue". How do you use a variable value within a script?
Please indulge my question, I'm not sure whether I'm missing something from a js perspective, but the only instance of $gameVariables I can find is in DataManager and that doesn't declare the data type, so I'm a bit stuck, especially if there is syntax specific to RM (which I am too newbie to know for sure).
I need
if( (variable1 mod (2^(variable2)) < 2^(variable2 - 1)) {} which is obviously too complex for the non-script conditional branch options.
I understand I need to use
$gameVariables
and while I can see on the script calls spreadsheet I can change a variable by using $gameVariables.setValue(var,value);
I have no idea how to "getValue". How do you use a variable value within a script?
Please indulge my question, I'm not sure whether I'm missing something from a js perspective, but the only instance of $gameVariables I can find is in DataManager and that doesn't declare the data type, so I'm a bit stuck, especially if there is syntax specific to RM (which I am too newbie to know for sure).


