rex_ngio_scoreboard
Introduction
Handles loading and posting of high scores and scoreboards.
Handles loading and posting of high scores and scoreboards.
Usage
Manage boards
Manage score boards in the dashboard of "API Tools" -> "Scoreboards".
Manage score boards in the dashboard of "API Tools" -> "Scoreboards".
Board ID
Board ID will be shown at dashboard. Put this value into property "ID", or set by "Action:Set board ID". This board ID will be used for posting score or get scores of a board. Read current board by "Expression:BoardID".
Each rex_ngio_scoreboard object is responded to a board, designer can put many scoreboard object for each board.
Board ID will be shown at dashboard. Put this value into property "ID", or set by "Action:Set board ID". This board ID will be used for posting score or get scores of a board. Read current board by "Expression:BoardID".
Each rex_ngio_scoreboard object is responded to a board, designer can put many scoreboard object for each board.
Get boards
Sample capx
Call "Action:Get boards" to log all boards of this application.
Sample capx
Call "Action:Get boards" to log all boards of this application.
- "Condition:On get boards" will be triggered while get boards. Dump these boards as JSON format by "Expression:BoardsAsJSON".
- Otherwise "Condition:On get boards error" will be triggered, get error message by "Expression:ErrorMessage".
Retrieve boards
Retrieve boards by "Condition:For each board", get properties of each board by "Expression:CurBoardName: board name", "Expression:CurBoardID". Index of the for each loop is "Expression:LoopIndex".
Or get properties of a board by index "Expression:Index2BoardName( index )", "Expression:Index2BoardID( index )".
Retrieve boards by "Condition:For each board", get properties of each board by "Expression:CurBoardName: board name", "Expression:CurBoardID". Index of the for each loop is "Expression:LoopIndex".
Or get properties of a board by index "Expression:Index2BoardName( index )", "Expression:Index2BoardID( index )".
Post score
Sample capx
Follow these steps to post score on a board -
Sample capx
Follow these steps to post score on a board -
- Login and set board ID in property "ID" or set by "Action:Set board ID"
- Call "Action:Post score" to post score.
- "Condition:On post score" will be triggered while posting success. Get posted board ID by "Expression:BoardID". Otherwise "Condition:On post score error" will be triggered, get error message by "Expression:ErrorMessage".
Tag
Add a tag before posting by property "Tag" or by "Action:Set tag", which can be used to filter while getting scores.
Get current tag configuration by "Expression:Tag"
Add a tag before posting by property "Tag" or by "Action:Set tag", which can be used to filter while getting scores.
Get current tag configuration by "Expression:Tag"
Get scores
Uses one of these actions to get scores from a board which set by property "ID".
Uses one of these actions to get scores from a board which set by property "ID".
Get scores from start index
Call "Action:Request in a range" to get scores from start index with amount of scores.
"Condition:On get scores" will be triggered while getting score. Get posted board ID by "Expression:BoardID", otherwise "Condition:On get scores error" will be triggered, get error message by "Expression:ErrorMessage".
Call "Action:Request in a range" to get scores from start index with amount of scores.
"Condition:On get scores" will be triggered while getting score. Get posted board ID by "Expression:BoardID", otherwise "Condition:On get scores error" will be triggered, get error message by "Expression:ErrorMessage".
Get scores page by page
Call one of these actions to get scores page by page
Get current page index by "Expression:PageIndex".
Call one of these actions to get scores page by page
- Action:Turn to page
- Action:Update current page
- Action:Turn to next page
- Action:Turn to previous page
Get current page index by "Expression:PageIndex".
Receive scores
"Condition:On get scores" will be triggered while getting score. Get properties by these expressions-
"Condition:On get scores" will be triggered while getting score. Get properties by these expressions-
- Expression:BoardID: Requested board ID
- Expression:ScoresAsJSON: scores in JSON string
- Expression:StartIndex: start index of scores
Retrieve scores
Retrieve scores by "Condition:For each score", get properties of each score by these expressions -
Or get properties of a score by index
Retrieve scores by "Condition:For each score", get properties of each score by these expressions -
- Expression:CurUserName: user name of a score
- Expression:CurUserID: user ID
- Expression:CurFormattedValue: formatted value of a score
- Expression:CurValue: integer value of the score
Or get properties of a score by index
- Expression:Index2UserName( index )
- Expression:Index2UserID( index )
- Expression:Index2FormattedValue( index )
- Expression:Index2Value( index )
Period
Set time-frame before getting scores by property "Period" or set by "Action:Set period" or "Action:Set period by code".
Code of periods are -
Set time-frame before getting scores by property "Period" or set by "Action:Set period" or "Action:Set period by code".
Code of periods are -
- "D"=current day,
- "W"=current week ,
- "M"=current month,
- "Y"=current year,
- "A"=all-time.
Tag
Filter tag is set in property "Tag" or "Action:Set tag". See previous section "Tag" under "Post score".
Filter tag is set in property "Tag" or "Action:Set tag". See previous section "Tag" under "Post score".