- Apr 18, 2016
- Reaction score
- First Language
- Primarily Uses
I have a question about the Actor Variables Plugin... Is there a way for the variable to display as something other than just a number? Like if you have a percent of something? Or you have something like 5/10 objects? At the moment all I know of it that the plugin displays the name of the Variable and the information it holds... that's it. If I made a variable 40% of something the variable would display that as 40.
Is there something I'm missing?
The variable is just a spot to store what you want displayed. So you could essentially do whatever you want with it. For instance, if you wanted to have variable 2 tracking how many objects the party acquired, and variable 3 set to the maximum acquirable objects, you could use variable 1 as the Actor Variable and have it update the party's progress via the script line:
$gameVariables.setValue(1, $gameVariables.value(2).toString() + "/" + $gameVariables.value(3).toString());
If variable 2 is set to 5 and variable 3 is set to 10, variable 1 will be displayed as "5/10".
In the same way, if you figure out your percentage in script, you can place that value as a string into the Actor Variable whenever it needs to update and viola, you have a percentage displayed. Just make sure to use the .toString() function on whatever variable you don't want converted to a number when it's put into the display variable.
Hope that helps.
Last edited by a moderator: