GMS Tutorials: Variable Basics and Quick Reference Area

Subscribers:
85
Published on ● Video Link: https://www.youtube.com/watch?v=V4ySf4ccQpc



Category:
Tutorial
Duration: 14:37
26 views
0


To support my channel and ensure future development of content, please consider giving me a tip here: https://streamelements.com/glyphicenigma/tip [THIS PLAYLIST IS MADE AS A 1 ON 1 TUTORIAL FOR SOMEONE SPECIFIC]

I go over variable basics, the quick reference functions, and the help file.

Variable Reference Script:

/*

--- GLOBAL VARIABLES --- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

--Definition:

globalvar [variable name] ; // When defined this way, there is no need to type out "global." \\
-or
global.[variable name] ; // When defined this way, the variable is made obvious that it's global \\

--Used for:

A global variable is used for values in your project that require
multiple instances to manipulate them, or a value that needs to
be read by multiple instances.
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
--- INSTANCE VARIABLES ---

--Definition:

[variable name] = [default variable value] ; // This is only defined within the Create Event \\

--Used for:

An instance variable is used only within the instance in which
it's defined, and can be referenced or manipulated by other
instances in various ways.
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
--- LOCAL VARIABLES ---

--Definition:

var [variable name] ( ; ) ( = [default variable value] ; ) // Parenthesis denote optional choice paths \\

--Used for:

Local variables are used only within the code action or script
in which they are defined, and cannot be referenced outside
of the definition location.