Icon

Batch SDK Simple Feature

Mattia Fortunati

You must be logged in to obtain assets

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).

Age Rating: 4+

Version

GMS1 - Version 1.0.1. Published March 14, 2017

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait