Global Save Data

Mr. Trivel

Glasses
Veteran
Joined
Jun 9, 2014
Messages
284
Reaction score
461
First Language
Lithuanian
Primarily Uses
Author: Mr. Trivel


Name: Global Save Data


Version: 1.0


Created: 2016-03-31




 


What does it do?


Allows player to set and change variables that affect all saves.


 


Video:










 


How to use?






To set global variables, use the following Plugin Calls:


 



GlobalVar Set [NAME] [VALUE] - Sets variable to [VALUE]


GlobalVar Add [NAME] [VALUE] - Adds [VALUE] to variable


GlobalVar Sub [NAME] [VALUE] - Subtracts [VALUE] from value


 


[NAME] - Variable name, case sensitive


[VALUE] - Value of variable a number or true/false


 


Examples:


GlobalVar Set Glasses true


GlobalVar Set GameCompleted 1


GlobalVar Add GameCompleted 1


GlobalVar Sub GameCompleted 2


 


To check global variable in a conditional branch or somewhere else, use this code:


DataManager.getGlobalVar(NAME)


 


Example:


DataManager.getGlobalVar(Glasses)








 


Plugin: <Link: Github>


How to download the Plugin: Click the link above, there will be a button named Raw, press Right Click -> Save As.


 


Terms of Use:


Don't remove the header or claim that you wrote this plugin.


Credit Mr. Trivel if using this plugin in your project.


Free for commercial and non-commercial projects.
 
Joined
Nov 5, 2016
Messages
69
Reaction score
6
First Language
English
Primarily Uses
DataManager.getGlobalVar(Test) == yes
if i put that into the script part of a conditional branch i get this

ReferenceError: Test is not defined

And i did try having an actuall variable named "Test"
but it didn't work
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Writing out an idea for the No Travel Game Jam. I have a general plot and challenge written out, it's just a matter of filling the rest in and making it interesting.
A definite difficult time right now. How is everyone doing during this pandemic? I already have seen furloughs and layoffs.
Hollow 1977 wrote on Archeia's profile.
Hope you and your family are doing well during this difficult time. :)
My elderly neighbor whom I've been buying groceries for just got carried out of his home on a stretcher by guys with hazmat suits. Considering I've been his only point of contact for the past month it's probably safe to say my boss was right to tell me to stay home once I developed a mild cough after all.
Damn. All these new features to the forums. Takes some getting used to.

Forum statistics

Threads
95,642
Messages
930,673
Members
125,962
Latest member
seogenics
Top