Description

batchSimpleFeatureEx handles some basic functionalities for implementing Batch Automatic unlocking system into your Game Maker Android game.

With batchSimpleFeatureEx you can: - configure Batch with your API_KEY - open a popup which listens for any offer and callbacks to a Game Maker Studio Async Social event whenever an offer is found.

NOTE: for resource offers, quantity is passed to Game Maker as String.

Into the Async Social "batchFeature" or "batchResource" are passed as "type", references are passed as "reference" while value and quantity are passed both as "value".

IMPORTANT NOTE: this is just a simple implementation of the Batch unlock feature, in fact, batchSimpleFeatureEx can handle only one offer and one item at time, because after an offer is found the Game Maker Studio Async Social event is called and the waiting popup is closed automatically.

I hope this implementation can help you, even if you need to implement more complex Batch functionalities.

Usage:

batchSetup("API_KEY")

To be called at the very beginning of your game. Use your Batch API key.

batchOpen("Promotion", "Searching for an offer ...", "Close")

To open the listening popup.

var type = string(async_load[? "type"];)
var reference = string(async_load[? "reference"];)
var value = string(async_load[? "value"];)

if (type == "batchFeature"){
    //feature offer received
    if (reference == "FREE_VERSION"){
    //unlock the free version
    }
    var message_to_user = value
    //prompt custom message to the user
}

if (type == "batchResource"){
    //resource offer received
if (reference == "FREE_GOLD"){
    //unlock some gold to the user
var gold_to_unlock = value
//give the user gold_to_unlock golds
}
}

Into a Social Async event, to handle the received offer. Happy Coding!

IMPORTANT NOTE: SINCE THE BATCH.COM TEAM CLOSED THEIR UNLOCK SERVICE, PART OF THIS EXTENSION WON'T WORK ANYMORE.

More info

End User Licence Agreement (EULA).

Version 1.0.1. Published March 14, 2017

Created with GameMaker: Studio v1.4.1474

Age Rating: 4+

Average Rating

Your review

You can only review assets you've bought.


Gravatar

Casey R 04 January 2017

It WORKS

It's not a perfect solution, but it is A SOLUTION. The ONLY SOLUTION.

Plus, it didn't work for me at first, but the developer was VERY helpful in helping me get it up and running.

Note to dev: consider updating the icon, it kinda gives a poor impression.

This review was left for a previous version of this asset.


Gravatar

Frank G 18 May 2015

Works just fine!

I needed to implement Batch in my game and this extension was just what I was looking for!

This review was left for a previous version of this asset.

Package contents

Total size 182 KB

What is the issue?

Back to Top