Documentation

Catch

Description

This Addon allows playing a simple "Catch" game, where you have to catch a "correct" falling object and avoid the "wrong" ones. You can move the plate by using the arrows (← or →) or mouse (click on the left or right side of the game).

Properties

The list starts with the common properties, learn more about them by visiting the Modules description section. The other available properties are described below.

Property name Description
Items List of object with properties: Image, Description, Is Correct, Levels (in range 1 to 3, separated by comma)
Item width Logical width (in pixels) of every item.
Item height Logical height (in pixels) of every item.
Points to finish Correct points to finish current level or game. If it's 0, then game never ends.
Count errors Count errors to points (every error is minus one point).

Scoring

Property Description
score Number of correct objects caught.
errorCount Number of wrong objects caught.

Supported commands

Command name Params Description
hide --- Hides the addon.
show --- Shows the addon.
reset --- Resets drawing.
setLevel number Sets game level. (in range of 1 to 3)
getPoints --- Returns points from a current level.
getErrors --- Return errors from a current level.
getMaxScore --- 0 if property "Points to finish" equals 0 (then it's neverending game). Else its value of "Points to finish".

Events

correct object event

Field name Description
Source addon ID
Item item number (from Items property)
Value 1
Score Always: 1

wrong object event

Field name Description
Source addon ID
Item item number (from Items property)
Value 1
Score Always: 0

game end event

Field name Description
Source addon ID
Item 'all'
Value 'EOG'
Score Always: 1

object created event

Field name Description
Source addon ID
Item item number (from Items property)
Value 0
Score Always: 0

Advanced Connector integration

Each command supported by the Catch addon can be used in the Advanced Connector addon's scripts. The below example shows how to change level when the Single State Button is selected.

    EVENTSTART
    Name:ItemSelected
    Item:LevelTwo
    SCRIPTSTART
    var catch = presenter.playerController.getModule('Catch1');
    catch.setLevel(2);
    SCRIPTEND
    EVENTEND

Demo presentation

Demo presentation contains examples on how to use the Catch addon.