[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?
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?
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.
Pages:
1














