Documentation

Catch

Description

The Catch module allows you to create a simple "Catch" game, where you have to catch the "correct" falling objects and avoid the "wrong" ones. You can move the plate (it can be changed to something else in the Plate image property) by using the arrows (← or →) or mouse (click on the left or right side of the plate).

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 objects with properties: Image, Description, Is Correct, Levels (in the range 1 to 3, separated by comma).
Item width The width (in pixels) of every item.
Item height The height (in pixels) of every item.
Points to finish Correct points to finish the current level or game. If it's 0, then the game never ends.
Count errors Every error is minus 1 point.
Plate image Sets the image for the plate.

Scoring

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

Supported commands

Command name Params Description
hide --- Hides the module if it is visible.
show --- Shows the module if it is hidden.
reset --- Resets the game.
setLevel number Sets the level of the game (in the range of 1 to 3).
getPoints --- Returns points from the current level.
getErrors --- Return errors from the current level.
getMaxScore --- 0 if the property Points to finish equals 0 (then it's a never-ending game). Otherwise, it's the value of the Points to finish property.

Events

correct object event

Field name Description
Source module's ID
Item item number (from the Items property)
Value 1
Score Always: 1

wrong object event

Field name Description
Source module's ID
Item item number (from the Items property)
Value 1
Score Always: 0

game end event

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

object created event

Field name Description
Source module's ID
Item item number (from the Items property)
Value 0
Score Always: 0

Advanced Connector integration

Each command supported by the Catch module can be used in the Advanced Connector module's scripts. The example below shows how to change the 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 of how to use the Catch module.