Scripting: Script Editor

GG Maker  uses ‘Event-Driven Programming’, which is a form of coding where pre-written pieces of code (or ‘Events’) are used to build scripts in a more visually efficient way for the user. In GG Maker, all scripts have a root which is the ‘Start’ event. Events connected to ‘Start’ will begin when the script Is ran and flow in order, like a flowchart. Anything not connected to this event will be ignored.

By clicking ‘Expand Events’, you can view a longer list of pre-built scripts. Each of these comes with a small description which tells you what each event does when attached to ‘Start’.

When adding new events, they will automatically attach themselves to the last event selected, or ‘Start’ if no events have been placed. The links between events can be broken by right-clicking on them. You can reattach these links by clicking and holding the desired node and moving the cursor until a red line appears. Drag this red line to the desired node and release the cursor.

Some events have parameters that can be changed to produce your desired result. For instance, the ‘Change Existence’ event has the option to change whether an actor ‘exists’ or not. To change these options, double-click on the event or right-click and select ‘edit’ once the event has been placed.

Some events also have a sub directory where scripts are stored, and if these events have parameters then they can only be edited by using ‘edit’. Double-clicking these will open the sub directory.



Textual Scripting 

<span style="font-size:12.0pt;line-height:107%;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">If you are a newcomer to GG Maker or are unfamiliar with Visual Basic, it is not recommended that you use Textual Scripting. By clicking ‘Mode’ in a script and selecting ‘Textual’, all of your events will convert over into code, HOWEVER this will not work in the opposite direction. Your events may be lost if you choose to return to graphical mode.

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;line-height:107%;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;line-height: 107%;font-family:"CalibriLight",sans-serif;mso-ascii-theme-font:major-latin; mso-hansi-theme-font:major-latin">Using Values 

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;line-height:107%;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">A lot of events in Graphical Scripting will give you the option to retrieve data from different use values by clicking on the clear white box next to an event parameter. These are useful for retrieving all kinds of data which have their uses in scripts, such as items, player health, maps, etc.

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;line-height:107%;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;line-height: 107%;font-family:"CalibriLight",sans-serif;mso-ascii-theme-font:major-latin; mso-hansi-theme-font:major-latin">Identifiers 

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;line-height:107%;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">These include: Global Variables, Local Variables, Switches, Collections and Tables. An identifier is used for storing and retrieving types of information for use in-game.

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;line-height:107%;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;line-height: 107%;font-family:"CalibriLight",sans-serif;mso-ascii-theme-font:major-latin; mso-hansi-theme-font:major-latin">String/Numeric Literals 

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;line-height:107%;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">When referring to string literals, enclose the string with quotations (“ “). For example, when displaying the player’s name, you would first store the name in a Global Variable. You could then call this name in dialogue by using “& <span style="font-size:12.0pt;line-height:107%;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font: minor-latin;mso-hansi-theme-font:major-latin"> strPlayersName”. The concatenate operator (&) is used alongside the name of the Global Variable, retrieving the name data from the variable.

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt">

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt"><span style="font-size:12.0pt;line-height: 107%;font-family:"CalibriLight",sans-serif;mso-ascii-theme-font:major-latin; mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin;mso-hansi-theme-font: major-latin">Operators 


 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">[+] <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used to add two values together.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">[-] <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used to subtract two values from each other.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">[*] <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used to multiply two values together.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">[/] <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used to divide two values from each other.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">[=] <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used to determine if one value is equal to another.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">[<] <span style="font-size:12.0pt;font-family: "CalibriLight",sans-serif;mso-ascii-theme-font:major-latin;mso-hansi-theme-font: major-latin"> - is used to determine if one value is less than another.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">[>] <span style="font-size:12.0pt;font-family: "CalibriLight",sans-serif;mso-ascii-theme-font:major-latin;mso-hansi-theme-font: major-latin"> - is used to determine if one value is greater than another.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">[<=] <span style="font-size:12.0pt;font-family: "CalibriLight",sans-serif;mso-ascii-theme-font:major-latin;mso-hansi-theme-font: major-latin"> - is used to determine if one value is less than or equal to another.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">[>=] <span style="font-size:12.0pt;font-family: "CalibriLight",sans-serif;mso-ascii-theme-font:major-latin;mso-hansi-theme-font: major-latin"> - is used to determine if one value is greater than or equal to another.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">[<>] <span style="font-size:12.0pt;font-family: "CalibriLight",sans-serif;mso-ascii-theme-font:major-latin;mso-hansi-theme-font: major-latin"> - is used to determine if one value is not equal to another.


 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">And <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used to determine if two or more values are true (for example; <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif;mso-ascii-theme-font: major-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin; mso-hansi-theme-font:major-latin">Player1.NonExistent = Existent And Player1.Name = “Bob” <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">- the script won't execute unless 'Player1' is both existent AND called Bob)
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">Or <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used to determine if one or the other values are true (for example; <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif;mso-ascii-theme-font: major-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:minor-latin; mso-hansi-theme-font:major-latin">Player1.NonExistent = Existent Or Player1.Name = “Bob” <span style="font-size:12.0pt; font-family:"CalibriLight",sans-serif;mso-ascii-theme-font:major-latin; mso-hansi-theme-font:major-latin">- the script will execute if 'Player1' is either existent OR called Bob)
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">Xor <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used to determine if one and only one of the two values being compared is true. If you use the regular 'Or' operator and both values it compares are true it'll return as being true, however with the 'Xor' operator the value will return false because only one of the two values can be true.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">Not <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used with 'And' or 'Or' operators to determine if a value is not true (for example; <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin;mso-hansi-theme-font:major-latin">Player1.NonExistent = Existent And Not Player1.Name = “Bob” <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif;mso-ascii-theme-font: major-latin;mso-hansi-theme-font:major-latin">- the script will only execute if 'Player1' is existent AND is NOT called Bob)
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">Concatenate (&) <span style="font-size:12.0pt; font-family:"CalibriLight",sans-serif;mso-ascii-theme-font:major-latin; mso-hansi-theme-font:major-latin"> - is used to join multiple values together (for example; “My name is ” & strPlayersName - with 'strPlayersName' being a Global Variable that stores the main players name) Not to be mistaken by the add operator. The add operator will literally try to add the two values together as if it's a mathematical equation whereas the concatenate operator is used as a means of joining values together and then comparing the expression as a whole.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">Imp <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used to determine an implication of two values.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">Eqv <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used to determine an equivalent of two values.
 * <span style="font-size:12pt;font-family:'CalibriLight',sans-serif;">Mod <span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin"> - is used to divide two values and only return the remainder.

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height: normal"><span style="font-size:12.0pt; font-family:"CalibriLight",sans-serif;mso-ascii-theme-font:major-latin; mso-hansi-theme-font:major-latin">  

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height: normal"><span style="font-size:12.0pt; font-family:"CalibriLight",sans-serif;mso-ascii-theme-font:major-latin; mso-hansi-theme-font:major-latin">Units of Measurement 

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height: normal"><span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">Pixels: The very small squares used to make up an image are called pixels. If you have a screen resolution of 800x600, the game will show 900 pixels running horizontally and 600 running vertically.

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height: normal"><span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">Milliseconds: This is 1/1000th of a second. 1000 milliseconds are equivalent to 1 second.

<p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height: normal"><span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">Pixels Per Millisecond (px/ms): This is the amount of pixels an object will move by per millisecond. This is used for things such as Actor Speed. <p class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height: normal"><span style="font-size:12.0pt;font-family:"CalibriLight",sans-serif; mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin">Pixels Per Millisecond Squared (px/ms/ms): This is the amount of pixel an object will move by per millisecond, per millisecond. An Actor’s Acceleration and Velocity  are measured using this.