- Joined
- Oct 7, 2013
- Messages
- 182
- Reaction score
- 470
- First Language
- English
- Primarily Uses
- RMMV
Default Variables v1.0
by futrchamp
This script simply allows you to set certain variables to have a value that is set when the game starts.Instructions:
Paste into the script editor below materials and above main.
Change the numbers in the Variables= line to whichever variables you want to set.
Change the numbers in the Values= line to the corresponding values for each variable.
For example:
Variables=[2,3,6,8,9]
Values=[1,2,3,10,56]
Would set variable 2 to 1, variable 3 to 2, variable 6 to 3, and so on.
You can have as many variables in the array as you want, as long as each is assigned a value.
Compatibility:
Should be compatible with just about any script that doesn't modify the same things. Report any issues and I will try to make a patch for the script in question.
Terms of Use:
Usable in any project, commercial or non-commercial, with credit appreciated, but not required.
Code:
# Default Variables v1.0# by futrchamp# This script simply allows you to set certain variables to have a value that is # set when the game starts.# Instructions:# Change the numbers in the Variables= line to each variable you want to set.# Change the numbers in the Values= line to the corresponding values for each # variable.# For example:# Variables=[2,3,6,8,9]# Values=[1,2,3,10,56]# Would set variable 2 to 1, variable 3 to 2, variable 6 to 3, and so on.# You can have as many variables in the array as you want, as long as each is # assigned a value.module FutrDefaultVar # Set the variables to be changedVariables=[2,3,6,8,9] # Set corresponding valuesValues=[1,2,3,10,56]endclass Game_Variablesalias initialize_futrdefaultvars initializedef initialize(*a,& initialize_futrdefaultvars(*a,& i=0 while i<FutrDefaultVar::Values.length @data[FutrDefaultVar::Variables[i]] = FutrDefaultVar::Values[i] i+=1 endendend


