ads_setup

Setup offerwall support for ads.

Syntax:

GML Code Example

ads_setup(user_uuid, ad_app_key)


Argument Description
user_uuid The user key for the rewards currency.
add_app_key The app key for your game


Returns: N/A


Description

This function will pass the user id of the player to those providers, for example Supersonic and AdColony, that generate virtual currency "offerwalls" (essentially a page to promote several different advertising campaigns) and videos, so that the currency can be rewarded to the correct player for viewing or clicking these ads. The service providers should supply you with the app key for each specific game that you create and it is recommended that you store this as a constant within your game for ease of use later. Please refer to the YoYo Games Knowledge Base section on In App Advertising for more information related to your specific ad provider.

NOTE: Even if you only have your app configured for video advertising, you will still need to call this function to prepare the integrated developer api, but you should use and empty string ("") for the arguments.


Example:

GML Code Example

if os_get_config() = "FreeOfferwall"
    {
    ads_setup(u_id, APP_KEY);
    }
 

The above code will check the current configuration used for the game build and if it is "FreeOfferwall", then it will setup the advertising functions with the user id stored in the variable "u_id" and the application key stored in the custom constant "APP_KEY".





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here