This Construct 3 Addon is in beta version. If you notice any technical problem, please report it using the support button. Your feedback will help us improve the SDK integration experience. Thank you.
This section contains all the steps you need to do in order to properly integrate your Game with GamePix SDK and Construct 3
For Construct 3 R424 and later versions, download the plugin from here.
NB: Before reinstalling the add-on, make sure to clear your cache, as the update won’t work otherwise. If you remove and reinstall the add-on without doing so, an error will occur.
For older versions, download the plugin from here.
To install it, click on Menu > View > Addon manager

Click on "Install new addon" and select the addon file



Once done restart Construct 3.
To add the plugin to your project, simply right click the layout:

Then select the GamePix SDK addon and insert it into the project:

GamePix.loading and GamePix.loaded
These methods are automatically implemented when you import the plugin itself. If you need to be able to control how the loading should behave, you can disable the auto handling in the plugin’s parameters:


If you disable auto handling, make sure to call Gamepix.loaded before calling any other SDK method.
GamePix.updateScore
Call this function every time there's a score update inside the Game. The function accepts only numbers.

GamePix.updateLevel
Call this function every time the user gets to a new level. The function accepts only numbers.

GamePix.happyMoment
Send to the SDK if a particular "Happy Moment" just happened in your Game. It could be the unlocking of a special item, or triggering a cool event in the Game.

GamePix.rewardAd
This function will ask SDK to show a Reward Ad, and when the ad ends, it will trigger On rewarded succeeded, or On rewarded failed. It will also call On rewarded ended in both cases.

GamePix.interstitialAd
This function will ask SDK to show a Interstitial Ad, and you can use On Interstitial succeeded, or On Interstitial failed and Interstitial ended to listen for the end of the ad.

GamePixSDK.lang
If your game has localized texts you can check the current language asking which value is:

You first need to wait for the addon to load the language string. Possible values are those ones ['ar','zh','nl','en','fr','de','it','ja','ko','pl','pt','ru','es','tr']. If your games just use English you can skip this part.
GamePixSDK.pause and GamePixSDK.resume
You need to set up Pause and Resume triggers/hooks in your project:

GamePix will call these triggers when it wants your game to Pause or to Resume. Remember to check also that game sounds are muted once you Pause your game and unmuted on Resume.
To save and retrieve your game progress use the GamePix SDK LocalStorage functionalities. The localstorage actions mimic the actions you can find in the LocalStorage plugin in Construct 3 in that actions are asynchronous, and you can either use "Wait for previous actions to complete" or triggers to wait for them to complete.
GamePix.setItem
Use setItem to save a value inside GamePix.localStorage object. It accepts only string for key and value.

GamePixSDK.requestItem
Before you are able to use keys saved from a previous session, you need to request them, to load them from the Gamepix localstorage. You only need to do this once per key, and only at the start of the game. Any key that you set after that will automatically be updated properly, and you won’t need to request it again.

GamePixSDK.getItem
To retrieve a stored item you have to use GamePixSDK.getItem expression. This will return an empty string if the current searched item doesn't exist. You can also check if an item exists before trying to get it if you want to return a default value instead

GamePixSDK.removeItem
Remove item is similar to requestItem usage

Once you're ready with the SDK implementation you're to do the following steps
1. Export your game

2. Test the game inside GamePix Test Tool to see if all requirements are satisfied
The GamePix Test Tool is here.
