[RMVX ACE] TRYING TO REFERENCE A VARIABLE SELECTED VIA ANOTHER VARIABLE, HAVING SYNTAX ISSUES

Posts

Pages: 1
I'm not sure exactly what's wrong, but I'm trying to build a disposition system for conversation. The system should be pulling the value of one variable selected by another variable. I assume I have the syntax wrong, but I've tried several versions and I can't find someone doing the same thing to check it against.

The code I'm using is:
$gameVariables.setValue[$gameVariables.value, $gameVariables.value
[$gameVariables.value]];

I want Variable 4's value to be equal to another variable, which has an ID equal to Variable 7's value. Variable 4 is the Disposition variable I use for calculation. But each character has a separate Disposition saved to a different variable. Variable 7 is used as a pointer to indicate which variable's value should be pulled to Variable 4 (Disposition) for calculation. What did I do wrong?
Marrend
Guardian Gorgon of the Description Thread
17371
author=jarcherstudios
The code I'm using is...

$gameVariables.setValue[$gameVariables.value[4], $gameVariables.value[$gameVariables.value[7]]];

I want Variable 4's value to be equal to another variable, which has an ID equal to Variable 7's value. Variable 4 is the Disposition variable I use for calculation. But each character has a separate Disposition saved to a different variable. Variable 7 is used as a pointer to indicate which variable's value should be pulled to Variable 4 (Disposition) for calculation. What did I do wrong?

If this is actually for VX Ace, I think the (ruby) script would be...

$game_variables[4] = $game_variables[$game_variables[7]]

...this, or something along those lines. However, the lines of code that you posted indicate more of an MV (java script) approach. Which might be something like...

$gameVariables.setValue($gameVariables.value[4], $gameVariables.value[$gameVariables.value[7]]);

...this? Though, I must admit I don't have MV to double-check this suggestion.
I'm an idiot. I pulled that code from another forum thread without realizing it was mislabeled. That fixed it. Thanks so much for the help!
Pages: 1