Global

The Global addon extends the feature of the game application to implement object based global variables with persistent data option.

It features as a manageable global variable which can be grouped through separate objects, hence making cleaner events.

It can also automatically store the data on an allocated space on the application's storage, hidden from the user, inaccessible even with the Local Storage plugin, stored with a specified storage id.

It has also additional automation tools to make getting and setting of object-based global variables easy.

The best benefit for this plugin is that it is a sole Construct 3 Editor and c3runtime implementation, dedicated for optimization and performance with the c3runtime with ES6 API features.

The addon implements object-based global variables with persistent features and tools for Construct 3 applications.

Intstructions

1. The first step is to add the Global addon into the project.

2. The next step is to go to the Properties Bar while the Global object is selected.

3. The debug mode toggle, if enabled, will allow the logging of processes and errors in the [F12] Developer Tools : Console or the Safari Web Inspector.

4. The Persist Data option allows the saving of the Global object's global variables into the application's storage. Which will then be automatically synced on the next application start.

If the Persist Data is disabled but enabled before, the data it contains will be cleared, assuming the Storage ID is still the same.

5. The ID is the storage identifier key for the group of global variables in the current Global object. This is the key to access and write an allocated space on the application's storage

6. If the Persist Data is enabled, the ID will be the key used to access the written data in the application's storage.

Hence, if a global object swapped with another global object's id, then their global variable data will also be swapped.
This is assuming that both global variables have the same variable count and variable type, in order.

7. There can be multiple Global objects, which each holding a group of its own global variables. 

8. It can be in persist mode or non-persist mode, click for more information.

Actions, Conditions & Expressions

Actions

Tools :

  • Reset - Reset the global variables of the global object to their default values.

  • Load - Load variables from a JSON string, which can be retrieved from the 'Global.AsJSON' expression.

    • JSON - Input the JSON string which contains the state for the global object.

Storage :

  • Save - Updates the persistent storage with the current value of the global variables.

Automate :

  • Set Variable By Index - Sets the value of a global variable using the index for reference.

    • Index - The index reference for the global variable. Starts with '0'.

    • Value - The value to set the global variable. Remember to maintain the data type. If a boolean, '0' = false ; '1' = true.

Conditions

Storage :

  • Is Synced - If 'persist data' is enabled, this will indicate if the global object is finished syncing with the stored data. Otherwise, it will instantly be true.

  • On Save - The trigger fires when the global object's persistent storage was updated successfully with the latest state.

 

  • On Save Failed - The trigger fires when the global object's persistent storage attempt to update with the latest state, has failed.

Automate :

  • For Each Variable - Loops through all the global variables in the global object.

Expressions

Tools :

  • AsJSON - Returns the JSON string of the global object which contains the global variables and their values.

Automate :

  • CurVariableIndex - Returns the current global variable index from the 'For each variable" loop condition.

  • CurVariable - Returns the current global variable value from the 'For each variable" loop condition.

  • VariableCount - Returns the number of global variables in the global object.

  • VariableAt - Returns the value of the specified global variable by the index. Returns 0 if the global variable of that index position doesn't exist.

    • 0 - The global variable's positional index, starts from 0.

Properties

Configuration - The configuration section of the global object.

  • Debug Mode - If toggled enabled, it will log the processes and errors on the Developer Tools : Console.​

Storage - The storage configuration section of the global object.

  • Persist Data - Toggle enable to persist data to the application's storage.

  • ID - The identification for the allocated space in the application's storage.​

Features

The Global is an addon that allows the implementation of object-based global variables with persistent data features and object-based global variable management tools into an application made by with Construct 3, with dedicated design and support, exclusively for the c3runtime.

It allows a clean way of implementing global variables, by applying object based global variable groupings, so that the global variables won't clutter the compare variable dialog and expressions dialog.
With this, global variables can be grouped and the global variables would only show when a specific parent object group of the variables is invoked. Hence, clean event sheet management for global variables.

It also has a persistent storage option and object global variable automated management tools.

Features :

  • Global variable groupings.

  • Object-based global variables.

  • Persistent data, synced with the application's storage, loaded on every start of the app.

  • Easy to use and no programming required.

  • Well-supported and fully tested.

  • Global variable management tools.

  • Object automation, for-each loop through all global variables.

  • Persistent-Storage mode.

  • Default non-persistent storage mode.

  • Construct 3 editor support.

  • Construct 3 runtime.

  • Dedicated c3runtime design implementation.

  • Runtime maintenance support.

Feature Showcase

The Global is an addon that allows the implementation of object-based global variables with persistent data and global variable management tools into an application. The addon comes with two (2) different sample projects. 
One (1st) is the persistent-data mode, which keeps the data synced in the application's storage, which should load on every application startup. Another (2nd) is the non-persistent data mode, which shows the default features of the Global addon as a global variable grouping object, without the application sync feature.

Persistent Global Data

Non-Persistent Data

Persistent Global Variable

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

 
 
 
 
 
 

TobyR's Globals

The Global addon is inspired from TobyR's Globals 2.0 addon from Construct 2. It started the great idea of using objects as global variable groups. Hence, better global variable management and clean event sheets. Although, it doesn't have the persistent data feature and global variable management tools.

Default Global Variables

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

 
 

Get the tools

for your pro games!

Constuct Master Collection - Itch.io
Constuct Master Collection - Discord
Constuct Master Collection - Construct 3

© Construct Master Collection 2020 • All rights reserved

Contact Information: