Connect the pairs
Each animal has to be connected with a line to the sign with its name (the connect rule, points with the connectable role). The connection points are drawn on the images as rings, and the line anchor point (anchor) of each point is aimed at the middle of its ring: a line starts and ends at a ring, and the dots at its ends fill the rings. A wrong line stays red (wrongLines: keep) and blocks both points until the player clicks it; a right pair stays on the scene with its green line and is locked (lock), so it cannot be changed any more.
- Schema
- v2.3
- Required features
element.imageelement.textelement.componentvisual.textvisual.statescomponent.connectablecomponent.anchorrule.connectaction.play-soundaction.set-stateaction.lockaction.emit-particles- Components
imagetextcomponent









Bear
Owl
Cat
Fox
Draw a line from each animal to its name.
Click a wrong, red line to remove it.
Click a wrong, red line to remove it.
How to open it in the editor
- Click Open in the editor — GS Editor opens with the exercise loaded (scene and assets).
- Or click Download the exercise (a ZIP with
projekt.json,images/andsounds/) and choose Open ZIP in the start window of the editor.
Exercise file
Show the JSON (11,299 characters)
{
"schema": "2.3",
"requires": [
"element.image",
"element.text",
"element.component",
"visual.text",
"visual.states",
"component.connectable",
"component.anchor",
"rule.connect",
"action.play-sound",
"action.set-state",
"action.lock",
"action.emit-particles"
],
"id": "connect-pairs",
"size": {
"width": 1200,
"height": 675
},
"languages": [
"pl",
"en"
],
"defaultLanguage": "pl",
"assets": [
{
"id": "meadow",
"kind": "image",
"src": {
"default": "images/meadow.png"
}
},
{
"id": "cat",
"kind": "image",
"src": {
"default": "images/cat-point.png"
}
},
{
"id": "fox",
"kind": "image",
"src": {
"default": "images/fox-point.png"
}
},
{
"id": "bear",
"kind": "image",
"src": {
"default": "images/bear-point.png"
}
},
{
"id": "owl",
"kind": "image",
"src": {
"default": "images/owl-point.png"
}
},
{
"id": "plate",
"kind": "image",
"src": {
"default": "images/label-plate.png"
}
},
{
"id": "correct",
"kind": "audio",
"src": {
"default": "sounds/correct.wav"
}
},
{
"id": "wrong",
"kind": "audio",
"src": {
"default": "sounds/wrong.wav"
}
},
{
"id": "win",
"kind": "audio",
"src": {
"default": "sounds/win.wav"
}
}
],
"elements": [
{
"id": "background",
"type": "image",
"rect": [
0,
0,
1200,
675
],
"layer": 0,
"visual": {
"type": "image",
"asset": "meadow"
}
},
{
"id": "instruction",
"type": "text",
"rect": [
72,
20,
1056,
90
],
"layer": 5,
"visual": {
"type": "text",
"text": {
"pl": "Połącz linią każdego zwierzaka z jego <b>nazwą</b>.<br>Złą, czerwoną linię usuń kliknięciem.",
"en": "Draw a line from each animal to its <b>name</b>.<br>Click a wrong, red line to remove it."
},
"size": 30,
"color": "#5a3a22",
"align": "center",
"states": {
"win": {
"text": {
"pl": "Brawo! Wszystkie pary są połączone.",
"en": "Well done! All the pairs are connected."
},
"size": 40,
"color": "#2e8b3a"
}
}
}
},
{
"id": "cat",
"type": "component",
"rect": [
100,
150,
130,
130
],
"layer": 2,
"visual": {
"type": "image",
"asset": "cat"
},
"connectable": true,
"anchor": {
"point": [
65,
116
]
},
"on": {
"correct": [
{
"do": "play-sound",
"asset": "correct",
"exclusive": true
},
{
"do": "emit-particles",
"target": "self"
},
{
"do": "lock",
"target": "self"
}
],
"wrong": [
{
"do": "play-sound",
"asset": "wrong",
"exclusive": true
}
]
}
},
{
"id": "fox",
"type": "component",
"rect": [
390,
150,
130,
130
],
"layer": 2,
"visual": {
"type": "image",
"asset": "fox"
},
"connectable": true,
"anchor": {
"point": [
65,
116
]
},
"on": {
"correct": [
{
"do": "play-sound",
"asset": "correct",
"exclusive": true
},
{
"do": "emit-particles",
"target": "self"
},
{
"do": "lock",
"target": "self"
}
],
"wrong": [
{
"do": "play-sound",
"asset": "wrong",
"exclusive": true
}
]
}
},
{
"id": "bear",
"type": "component",
"rect": [
680,
150,
130,
130
],
"layer": 2,
"visual": {
"type": "image",
"asset": "bear"
},
"connectable": true,
"anchor": {
"point": [
65,
116
]
},
"on": {
"correct": [
{
"do": "play-sound",
"asset": "correct",
"exclusive": true
},
{
"do": "emit-particles",
"target": "self"
},
{
"do": "lock",
"target": "self"
}
],
"wrong": [
{
"do": "play-sound",
"asset": "wrong",
"exclusive": true
}
]
}
},
{
"id": "owl",
"type": "component",
"rect": [
970,
150,
130,
130
],
"layer": 2,
"visual": {
"type": "image",
"asset": "owl"
},
"connectable": true,
"anchor": {
"point": [
65,
116
]
},
"on": {
"correct": [
{
"do": "play-sound",
"asset": "correct",
"exclusive": true
},
{
"do": "emit-particles",
"target": "self"
},
{
"do": "lock",
"target": "self"
}
],
"wrong": [
{
"do": "play-sound",
"asset": "wrong",
"exclusive": true
}
]
}
},
{
"id": "name-bear",
"type": "component",
"rect": [
65,
505,
200,
80
],
"layer": 1,
"visual": {
"type": "image",
"asset": "plate"
},
"connectable": true,
"anchor": {
"point": [
100,
14
]
},
"on": {
"correct": [
{
"do": "play-sound",
"asset": "correct",
"exclusive": true
},
{
"do": "emit-particles",
"target": "self"
},
{
"do": "lock",
"target": "self"
}
],
"wrong": [
{
"do": "play-sound",
"asset": "wrong",
"exclusive": true
}
]
}
},
{
"id": "name-owl",
"type": "component",
"rect": [
355,
505,
200,
80
],
"layer": 1,
"visual": {
"type": "image",
"asset": "plate"
},
"connectable": true,
"anchor": {
"point": [
100,
14
]
},
"on": {
"correct": [
{
"do": "play-sound",
"asset": "correct",
"exclusive": true
},
{
"do": "emit-particles",
"target": "self"
},
{
"do": "lock",
"target": "self"
}
],
"wrong": [
{
"do": "play-sound",
"asset": "wrong",
"exclusive": true
}
]
}
},
{
"id": "name-cat",
"type": "component",
"rect": [
645,
505,
200,
80
],
"layer": 1,
"visual": {
"type": "image",
"asset": "plate"
},
"connectable": true,
"anchor": {
"point": [
100,
14
]
},
"on": {
"correct": [
{
"do": "play-sound",
"asset": "correct",
"exclusive": true
},
{
"do": "emit-particles",
"target": "self"
},
{
"do": "lock",
"target": "self"
}
],
"wrong": [
{
"do": "play-sound",
"asset": "wrong",
"exclusive": true
}
]
}
},
{
"id": "name-fox",
"type": "component",
"rect": [
935,
505,
200,
80
],
"layer": 1,
"visual": {
"type": "image",
"asset": "plate"
},
"connectable": true,
"anchor": {
"point": [
100,
14
]
},
"on": {
"correct": [
{
"do": "play-sound",
"asset": "correct",
"exclusive": true
},
{
"do": "emit-particles",
"target": "self"
},
{
"do": "lock",
"target": "self"
}
],
"wrong": [
{
"do": "play-sound",
"asset": "wrong",
"exclusive": true
}
]
}
},
{
"id": "label-bear",
"type": "text",
"rect": [
65,
525,
200,
56
],
"layer": 2,
"visual": {
"type": "text",
"text": {
"pl": "<b>Miś</b>",
"en": "<b>Bear</b>"
},
"size": 40,
"color": "#5a3a22",
"align": "center"
}
},
{
"id": "label-owl",
"type": "text",
"rect": [
355,
525,
200,
56
],
"layer": 2,
"visual": {
"type": "text",
"text": {
"pl": "<b>Sowa</b>",
"en": "<b>Owl</b>"
},
"size": 40,
"color": "#5a3a22",
"align": "center"
}
},
{
"id": "label-cat",
"type": "text",
"rect": [
645,
525,
200,
56
],
"layer": 2,
"visual": {
"type": "text",
"text": {
"pl": "<b>Kot</b>",
"en": "<b>Cat</b>"
},
"size": 40,
"color": "#5a3a22",
"align": "center"
}
},
{
"id": "label-fox",
"type": "text",
"rect": [
935,
525,
200,
56
],
"layer": 2,
"visual": {
"type": "text",
"text": {
"pl": "<b>Lis</b>",
"en": "<b>Fox</b>"
},
"size": 40,
"color": "#5a3a22",
"align": "center"
}
}
],
"rule": {
"kind": "connect",
"pairs": [
[
"cat",
"name-cat"
],
[
"fox",
"name-fox"
],
[
"bear",
"name-bear"
],
[
"owl",
"name-owl"
]
],
"inOrder": false,
"draw": "drag",
"lineWidth": 8,
"lineColor": "#23763f",
"wrongLines": "keep"
},
"on": {
"completed": [
{
"do": "set-state",
"target": "instruction",
"state": "win"
},
{
"do": "play-sound",
"asset": "win"
}
]
}
}