Initializes the Game Center service. Use a Game Center event to know if initialization has succeeded.
gameCenterInitialize();
Returns true
if Game Center is currently active.
gameCenterIsAuthenticated()
Returns the [Name / ID] of the current player.
gameCenterGetPlayerName()
gameCenterGetPlayerID()
Submits a score to the given leaderboard (by leaderboard ID).
gameCenterSubmitScore([NUMBER], [TEXT]);
Shows the given leaderboard (by leaderboard ID).
gameCenterShowLeaderboard([TEXT]);
Reports the completion status for an achievement (given an achievement ID). Number must be between [0 - 100] inclusive.
gameCenterSubmitAchievement([TEXT], [NUMBER]);
Shows a page containing all of the game's achievements. This block can also reset (erase) all of a game's achievements.
gameCenterShowAchievements();
gameCenterResetAchievements();
Shows an achievement banner. Provide the title and text for this banner.
gameCenterShowBanner([TEXT], [TEXT]);
Starts the Google Play Games service.
initGooglePlayGames();
stopGooglePlayGames();
Returns true
if Google Play Games is ready to use. Other status checks are available for pending (attempting to connect), failed (to connect) and canceled (by user).
getGPGConnectionInfo(0) //established
getGPGConnectionInfo(1) //pending
getGPGConnectionInfo(2) //failed
getGPGConnectionInfo(3) //canceled
Shows a page containing every [achivement / leaderboard / quest] for your game.
showGPGAchievements();
showGPGLeaderboards();
showGPGQuests();
Shows the specified leaderboard (given a Leaderboard ID).
showGPGLeaderboard([TEXT]);
Unlocks the specified achievement (given an Achievement ID).
unlockGPGAchievement([TEXT]);
Updates the player's progress towards an incremental achievement (given an achievement ID). This will add to the existing amount.
incrementGPGAchievement([TEXT], [INT]);
Submits a score to the specified leaderboard (given a Leaderboard ID).
submitGPGScore([TEXT], [INT]);
Submits event data (given an Event ID) to Google. Event data is reportedi n batches, so there may be a slight delay in delivery.
updateGPGEvent([TEXT], [INT]);
Returns true
if a quest has been recently completed. Once this is called, this resets, so calling it again immediately will return false
.
hasNewGPGQuestCompleted()
Returns a list
of completed quests.
getCompletedGPGQuests()
Each quest that you define contains a reward value that you can use to offer items or other benefits to players in-game. This block (given a Quest ID) returns that value as text.
getGPGQuestReward([TEXT])
Initialize Admob banner and/or fullscreen ads. Use this block only once in your first scene.
Set banner position if you are using banners. If you are only using fullscreen ads, banner position can be ignored.
AdMob.init([TEXT], 0);
AdMob.init([TEXT], 1);
Shows (or hides) a banner ad for your game. Placed at the top or bottom of the screen (this is set in Settings > Mobile > Monetization). Uses iAd on iOS, AdMob on Android.
AdMob.showBanner();
AdMob.hideBanner();
Load / show a fullscreen ad for your game. Uses iAd on iOS, AdMob on Android.
AdMob.loadInterstitial();
AdMob.showInterstitial();
Reinitialize the banner. This may help if a banner failed to load.
AdMob.onResize();
Use this block to change the banner position at runtime.
AdMob.setBannerPosition(0);
AdMob.setBannerPosition(1);
Returns the height of the banner ad, so you can reposition your game elements accordingly.
(Engine.landscape ? 32 : 50)
Set your privacy policy URL that is used by the consent SDK.
This block is part of GDPR compliance in AdMob.
AdMob.setPrivacyURL([TEXT]);
Show the consent form (will only appear to players in the EEA).
This block is part of GDPR compliance in AdMob.
AdMob.showConsentForm(true);
AdMob.showConsentForm(false);
In order to retrieve title/price/description information for a product, you must request that info from Google/Apple. This block sends in that request (given the Product ID). You can check for success using a Purchase event.
purchasesRequestProductInfo([[TEXT]]);
Returns true
if the purchasing API is ready to use.
purchasesAreInitialized()
Buy (or use) a product (given a Product ID). This makes a request to do these actions - you must check for success or failure using a Purchase Event.
purchasesBuy([TEXT]);
purchasesUse([TEXT]);
Unmanaged products on Android are now treated as managed consumable purchases. This block "frees" up those purchases, so they can be repurchased by players, without having to set up new entries for them.
purchasesGoogleConsume([TEXT]);
Returns true
if the specified product (given a Product ID) has been bought by the player. For a consumable, returns true
if the player currently owns 1 or more of that product.
purchasesHasBought([TEXT])
For a consumable product, will return the amount of the specified product (given a Product ID) that the player owns.
purchasesGetQuantity([TEXT])
Optional: Validate Receipt with Itunes before player gets items.
ID:'productID'
Shared Secret:'ITunesConnect->Your game->In-App Purchases->View Shared Secret' select Sandbox when testing
Purchases.validateReceipt([VALUE],[TEXT],true);
Purchases.validateReceipt([VALUE],[TEXT],false);
Manually tell the Apple/Google to restore a player's purchases. This will emit Purchase Restored events that you will need to handle.
purchasesRestore();
Returns the [title/price/description] of the specified product (given a Product ID). Must use the request info for product
block before this information is available.
purchasesGetTitle([TEXT])
purchasesGetDescription([TEXT])
purchasesGetPrice([TEXT])
Displays a native modal (blocking) dialog to the user. Provide the title and message.
showAlert([TEXT], [TEXT]);
iOS-only. Sets your app icon's badge number. For example, on an e-mail app, this would report the number of unread messages. For a game, perhaps the number of notifications / events that have happened in your game.
setIconBadgeNumber([NUMBER]);