ads_set_reward_callback

Set the reward callback script for PlayHaven interstitial.

Syntax:

ads_set_reward_callback(placement)


Argument Description
placement The PlayHaven placement name (a string)


Returns: N/A


Description

When generating content for the user using PlayHaven, the content can return callback values to your game, depending on what content it is and what rewards 8if any) are associated with it. To deal with this, you should create a script resource into which GameMaker: Studio will automatically pass the return arguments:

In this way with one single script you can reward the player with in game currency, items, etc... depending on the quantity returned and the reward name used.


Example:

ads_set_reward_callback(scr_AdsCallback);
ads_event("game_start");

The above code will set the callback script and then request an ad from PlayHaven for the placement named "game_start".


Back: Advertising and Analytics
Next: playhaven_add_notification_badge
© Copyright YoYo Games Ltd. 2018 All Rights Reserved