- Joined
- Jun 18, 2013
- Messages
- 235
- Reaction score
- 72
- First Language
- English
- Primarily Uses
so im editing the JS for a Yanfly script, and within it is the following line:
for (var i = 1; i <= 10; i++) {
this line is being used to create a dynamic list of variables to display. allowing for the list to be however big or small the user wants, however, im trying to create a Parameter that counts how many variables are currently being displayed since the number changes throughout the game. is there a line i can insert after this one that basically says "if 'i' is increased by 1, then increase this parameter by 1'? the idea being that by the end of the dynamic lists creation the parameter will be equal to the variable.
im not really asking for help with the script, just this algorithm, so i beleive this to be the right forum, if not, thank you moderator for moving it over! also, if context is needed for the algorithm, its in Yanfly's MainMenuVariable script. line 329
for (var i = 1; i <= 10; i++) {
this line is being used to create a dynamic list of variables to display. allowing for the list to be however big or small the user wants, however, im trying to create a Parameter that counts how many variables are currently being displayed since the number changes throughout the game. is there a line i can insert after this one that basically says "if 'i' is increased by 1, then increase this parameter by 1'? the idea being that by the end of the dynamic lists creation the parameter will be equal to the variable.
im not really asking for help with the script, just this algorithm, so i beleive this to be the right forum, if not, thank you moderator for moving it over! also, if context is needed for the algorithm, its in Yanfly's MainMenuVariable script. line 329