mergGK

Typelibrary
DictionaryLCS
LibraryLiveCode Script
Associationsmerggk
Description

mergGK is an iOS external that adds GameKit/Game Center commands and functions to LiveCode. The Game Center Programming Guide contains additional useful information.

TypeNameSummarySyntax
commandmergGKAuthenticateLocalPlayer

Authenticate the local player

mergGKAuthenticateLocalPlayer

- - -mergGKConnectToPeer

Connect to a peer

mergGKConnectToPeer <pPeer>

- - -mergGKLoadAchievements

Get the local player's achievements

mergGKLoadAchievements

- - -mergGKLoadChallenges

Achievements and leaderboards both allow players to measure their progress playing your game

mergGKLoadChallenges

- - -mergGKLoadFriends

Request a list of the local player's friends

mergGKLoadFriends

- - -mergGKLoadPlayers

Request the details of a list of players

mergGKLoadPlayers <pPlayerIDs>

- - -mergGKLoadScores

Get a leaderboard of scores

mergGKLoadScores <pCategory>, [<pTimeScope>], [<pPlayerScope>], [<pFrom>], [<pTo>], [<pPlayerIDs>]

- - -mergGKPostAchievement

Your game should report progress to Game Center whenever the player makes progress towards completing an achievement

mergGKPostAchievement <pAchievement>, <pPercentComplete>, [<pShowBanner>]

- - -mergGKPostScore

Your game should create the score object and report the score to Game Center immediately after the score is earned

mergGKPostScore <pCategory>, <pScore>, [<pSetDefaultLeaderboard>], [<pContext>]

- - -mergGKSendToAllPeers

Send data to all peers

mergGKSendToAllPeers <pData>

- - -mergGKSendToPeers

Send data to other peers

mergGKSendToPeers <pPeers>, <pData>

- - -mergGKShowAchievements

Present the Game Center achievement modal dialog

mergGKShowAchievements

- - -mergGKShowBanner

Allows your game to display a notification banner that displays text to the player

mergGKShowBanner <pTitle>, <pMessage>

- - -mergGKShowLeaderboard

Present the Game Center leaderboad modal dialog

mergGKShowLeaderboard <pCategory>, [<pTimeScope>]

- - -mergGKStartPeer

Register as a peer in the GameKit peer-to-peer session

mergGKStartPeer

- - -mergGKStopPeer

Stop the peer-to-peer session

mergGKStopPeer

functionmergGKDisplayNameForPeer

Get the display name for a peer

mergGKDisplayNameForPeer(<pPeer>)

- - -mergGKGetPeers

Get a list of peers with specified connection state

mergGKGetPeers(<pConnectionState>)

- - -mergGKIsGameCenterAvailable

mergGKIsGameCenterAvailable()

librarymergGK

mergGKIsGameCenterAvailable()

messagemergGKAchievementChallenge

Sent when the player clicks on a Game Center banner to select a score challenge

mergGKAchievementChallenge <pIssuingPlayerID>, <pIssueDate>, <pAchievementID>, <pPercentComplete>

- - -mergGKAchievements

Sent to the control that called mergGKLoadAchievements

mergGKAchievements <pAchievements>

- - -mergGKBannerShown

Sent to the object that requested the banner be shown after it is shown

mergGKBannerShown

- - -mergGKChallenges

Sent to the control that called mergGKLoadChallenges

mergGKChallenges <pScoreChallenges>, <pAchievementChallenges>

- - -mergGKConnectionWithPeerFailed

Sent to the control that called mergGKStartPeer when a connection to a peer fails

mergGKConnectionWithPeerFailed <pPeerID>, <pError>

- - -mergGKDataReceived

Sent to the control that called mergGKStartPeer when a peer sends some data

mergGKDataReceived <pPeerID>, <pData>

- - -mergGKFriends

Sent to the control that called mergGKGetFriends

mergGKFriends <pLocalPlayerFriendIDs>

- - -mergGKLocalPlayerAuthenticated

Sent to the control that called mergGKAuthenticateLocalPlayer whenever a new local player is authenticated

mergGKLocalPlayerAuthenticated <pPlayerID>, <pPlayerAlias>, <pPlayerDisplayName>, <pPlayerUnderAge>

- - -mergGKPeerChangedState

Sent to the control that called mergGKStartPeer when a peer changes state

mergGKPeerChangedState <pPeerID>, <pState>

- - -mergGKPlayers

Sent to the control that called mergGKGetPlayers

mergGKPlayers <pPlayers>

- - -mergGKScoreChallenge

Sent when the player clicks on a Game Center banner to select a score challenge

mergGKScoreChallenge <pIssuingPlayerID>, <pIssueDate>, <pCategoryID>, <pValue>, <pContext>

- - -mergGKScores

Sent to the control that called mergGKGetScores

mergGKScores <pScores>

- - -mergGKSessionFailed

Sent to the control that called mergGKStartPeer when a session fails

mergGKSessionFailed <pError>