- Joined
- Dec 6, 2015
- Messages
- 82
- Reaction score
- 10
- First Language
- english
- Primarily Uses
Cant say my attempt at array's are the best, but pretty much trying to get like a soccer/sports score board going.
8 teams, first 8 variables for the teams, bottom variables to put the in order, but im lost on how to convert this to rpg maker mv so i can put them in order or howd i get that... lets say variable 467 ended up first and how i would establish that and then the next 7 in order.
var Na = [$gameVariables.value(461), $gameVariables.value(464), $gameVariables.value(467), $gameVariables.value(470), $gameVariables.value(473), $gameVariables.value(476), $gameVariables.value(479), $gameVariables.value(482)];
Na.sort(function(a,d){return a < d});
var variable_names = {};
for(var i = 0; i< Na.length; i++){
variable_names['na_'+i] = Na;
}
//console.log(variable_names);
$gameVariables.setValue(397, variable_names.na_0);
$gameVariables.setValue(398, variable_names.na_1);
$gameVariables.setValue(399, variable_names.na_2);
$gameVariables.setValue(400, variable_names.na_3);
Thanks
8 teams, first 8 variables for the teams, bottom variables to put the in order, but im lost on how to convert this to rpg maker mv so i can put them in order or howd i get that... lets say variable 467 ended up first and how i would establish that and then the next 7 in order.
var Na = [$gameVariables.value(461), $gameVariables.value(464), $gameVariables.value(467), $gameVariables.value(470), $gameVariables.value(473), $gameVariables.value(476), $gameVariables.value(479), $gameVariables.value(482)];
Na.sort(function(a,d){return a < d});
var variable_names = {};
for(var i = 0; i< Na.length; i++){
variable_names['na_'+i] = Na;
}
//console.log(variable_names);
$gameVariables.setValue(397, variable_names.na_0);
$gameVariables.setValue(398, variable_names.na_1);
$gameVariables.setValue(399, variable_names.na_2);
$gameVariables.setValue(400, variable_names.na_3);
Thanks
Last edited:
