pxt-arcade 1.12.2 → 1.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/built/common-sim.d.ts +2 -2
  2. package/built/target.js +158 -146
  3. package/built/target.json +158 -146
  4. package/built/targetlight.json +5 -5
  5. package/built/theme.json +5 -0
  6. package/docs/SUMMARY.md +1 -0
  7. package/docs/hardware/adding.md +46 -52
  8. package/docs/hero-banner.md +8 -8
  9. package/docs/hour-of-code-2022-es.html +0 -1
  10. package/docs/hour-of-code-2022-pt.html +0 -1
  11. package/docs/hour-of-code-2022.html +12 -13
  12. package/docs/index-ref.json +1 -1
  13. package/docs/kiosk.html +1 -1
  14. package/docs/multiplayer.md +135 -0
  15. package/docs/projects/SUMMARY.md +3 -1
  16. package/docs/skillmap/balloon/balloon1.md +26 -312
  17. package/docs/skillmap/balloon/balloon2.md +18 -315
  18. package/docs/skillmap/balloon/balloon3.md +18 -317
  19. package/docs/skillmap/balloon/balloon4.md +105 -583
  20. package/docs/skillmap/balloon.md +14 -13
  21. package/docs/skillmap/mole/mole1.md +51 -326
  22. package/docs/skillmap/mole/mole2.md +43 -332
  23. package/docs/skillmap/mole/mole3.md +47 -316
  24. package/docs/{test/skillmap → skillmap}/mole/mole4.md +0 -0
  25. package/docs/skillmap/mole.md +14 -4
  26. package/docs/skillmap/turkey/turkey1.md +194 -127
  27. package/docs/skillmap/turkey/turkey2.md +144 -96
  28. package/docs/skillmap/turkey/turkey3.md +135 -84
  29. package/docs/skillmap/turkey.md +12 -10
  30. package/docs/skillmaps.md +24 -8
  31. package/docs/static/hero-gallery/holiday.png +0 -0
  32. package/docs/static/kiosk/asset-manifest.json +6 -6
  33. package/docs/static/kiosk/static/css/main.b60591be.css +2 -0
  34. package/docs/static/kiosk/static/css/main.b60591be.css.map +1 -0
  35. package/docs/static/kiosk/static/js/main.7c9f0b91.js +3 -0
  36. package/docs/static/kiosk/static/js/{main.01c7792a.js.LICENSE.txt → main.7c9f0b91.js.LICENSE.txt} +12 -32
  37. package/docs/static/kiosk/static/js/main.7c9f0b91.js.map +1 -0
  38. package/docs/static/multiplayer/help/emojis.png +0 -0
  39. package/docs/static/multiplayer/help/host-multiplayer.png +0 -0
  40. package/docs/static/multiplayer/help/hosted-game.png +0 -0
  41. package/docs/static/multiplayer/help/join-game.png +0 -0
  42. package/docs/static/multiplayer/help/joined-game.png +0 -0
  43. package/docs/static/multiplayer/help/share-button.png +0 -0
  44. package/docs/static/multiplayer/help/start-game.png +0 -0
  45. package/docs/static/skillmap/assets/dkc-logo-small.png +0 -0
  46. package/docs/static/tutorials/aliens/reload.png +0 -0
  47. package/docs/static/tutorials/arrows/2pbg.png +0 -0
  48. package/docs/static/tutorials/arrows/key.png +0 -0
  49. package/docs/static/tutorials/arrows/p1.png +0 -0
  50. package/docs/static/tutorials/arrows/p2.png +0 -0
  51. package/docs/static/tutorials/holiday/bgd.png +0 -0
  52. package/docs/static/tutorials/holiday/p1.png +0 -0
  53. package/docs/static/tutorials/holiday/p2.png +0 -0
  54. package/docs/static/tutorials/horse/finish.png +0 -0
  55. package/docs/static/tutorials/horse/frame.png +0 -0
  56. package/docs/static/tutorials/horse/p1.png +0 -0
  57. package/docs/static/tutorials/horse/p2.png +0 -0
  58. package/docs/test/courses/carnival.md +57 -0
  59. package/docs/test/courses/class-arcade.md +57 -0
  60. package/docs/test/skillmap/balloon.md +1 -1
  61. package/docs/test/skillmap/dino/{collectort1.md → dino1.md} +135 -79
  62. package/docs/test/skillmap/dino/{collectort2.md → dino2.md} +0 -0
  63. package/docs/test/skillmap/dino/{collectort3.md → dino3.md} +0 -0
  64. package/docs/test/skillmap/dino/{collectort4.md → dino4.md} +0 -0
  65. package/docs/test/skillmap/dino/{collectort5.md → dino5.md} +0 -0
  66. package/docs/test/skillmap/dino.md +82 -0
  67. package/docs/test/skillmap/mole.md +1 -1
  68. package/docs/test/skillmap/story/story1.md +8 -21
  69. package/docs/test/skillmap/story/story2.md +17 -28
  70. package/docs/test/skillmap/story/story3.md +51 -469
  71. package/docs/test/skillmap/story/story4.md +1 -2
  72. package/docs/test/skillmap/turkey.md +1 -0
  73. package/docs/test/tutorials/arrow.md +677 -0
  74. package/docs/test/tutorials/debug.md +180 -0
  75. package/docs/test/tutorials/holiday.md +609 -0
  76. package/docs/test/tutorials/horse.md +456 -0
  77. package/docs/test/tutorials/hundred.md +400 -0
  78. package/docs/test/tutorials/target.md +6 -2
  79. package/docs/test/tutorials/wakanda-forever.md +206 -147
  80. package/docs/tutorials/arrow.md +677 -0
  81. package/docs/tutorials/holiday.md +609 -0
  82. package/docs/tutorials/horse.md +456 -0
  83. package/docs/{test/tutorials/target/target_copy.md → tutorials/target.md} +11 -1085
  84. package/docs/tutorials/wakanda-forever.md +206 -147
  85. package/package.json +3 -3
  86. package/docs/skillmap/turkey/turkey0.md +0 -197
  87. package/docs/skillmap/turkey/turkey1a.md +0 -308
  88. package/docs/skillmap/turkey/turkey2a.md +0 -277
  89. package/docs/skillmap/turkey/turkey3a.md +0 -219
  90. package/docs/static/kiosk/static/css/main.927f4dad.css +0 -2
  91. package/docs/static/kiosk/static/css/main.927f4dad.css.map +0 -1
  92. package/docs/static/kiosk/static/js/main.01c7792a.js +0 -3
  93. package/docs/static/kiosk/static/js/main.01c7792a.js.map +0 -1
  94. package/docs/test/skillmap/balloon/balloon1.md +0 -247
  95. package/docs/test/skillmap/balloon/balloon2.md +0 -377
  96. package/docs/test/skillmap/balloon/balloon3.md +0 -389
  97. package/docs/test/skillmap/balloon/balloon4.md +0 -385
  98. package/docs/test/skillmap/mole/mole1.md +0 -382
  99. package/docs/test/skillmap/mole/mole2.md +0 -422
  100. package/docs/test/skillmap/mole/mole3.md +0 -384
  101. package/docs/test/skillmap/turkey/turkey1.md +0 -338
  102. package/docs/test/skillmap/turkey/turkey2.md +0 -318
  103. package/docs/test/skillmap/turkey/turkey3.md +0 -265
@@ -2,17 +2,18 @@
2
2
 
3
3
  ## {Intro @unplugged}
4
4
 
5
+ ![ ](https://code.org/api/hour/begin_msft_wakanda.png " ")
6
+
5
7
  Help Shuri, Okoye, and Riri Williams (Ironheart) escape Namor.
6
8
 
7
9
  ![Keep Namor Away!](/static/tutorials/wakanda/assets.png " ")
8
10
 
9
11
 
10
- Design a game in MakeCode Arcade, creating sprites for Shuri, Okoye, Ironheart, and Namor.
12
+ Design your own adventure in MakeCode Arcade, creating sprites for Shuri, Okoye, Ironheart, and Namor.
11
13
 
12
14
  ## {Step 2}
13
15
 
14
- First, let's set a scene background for Wakanda by using the code block that will place an
15
- image for the background.
16
+ **Let's visit Wakanda!**
16
17
 
17
18
  ---
18
19
 
@@ -22,6 +23,9 @@ and snap it into the empty <br/>
22
23
  ``||loops(noclick):on start||`` <br/>
23
24
  container already in the workspace.
24
25
 
26
+ - :mouse pointer: Click **Next** to get to the next set step.
27
+
28
+
25
29
  ```blocks
26
30
  //@highlight
27
31
  scene.setBackgroundImage(img`.`)
@@ -29,14 +33,16 @@ scene.setBackgroundImage(img`.`)
29
33
 
30
34
  ## {Step 3}
31
35
 
32
- - :paint brush: Click the **grey square** in the new block to open the image editor and choose a background from **My Assets**.
36
+ - :mouse pointer: Click the **empty grey square** in the<br/>
37
+ ``||scene(noclick):set background image to [ ]||`` <br/>
38
+ block that's now in your workspace.
33
39
 
40
+ - :paint brush: Switch to **My Assets** <br/>
41
+ ![Switch to My Assets](/static/skillmap/assets/my-assets-three.png " ")
42
+ and choose the **Wakanda** background.
34
43
  ![Choose Wakanda](/static/tutorials/wakanda/wakanda.png " ")
35
44
 
36
-
37
- _💡 Switch over to **My Assets** to choose the image named 'wakanda'._
38
- _The image name shows when you hover over it._
39
-
45
+ - :mouse pointer: Then click **Done**.
40
46
 
41
47
  ```blocks
42
48
  //@highlight
@@ -46,29 +52,26 @@ scene.setBackgroundImage(assets.image`wakanda`)
46
52
  ## {Step 4}
47
53
 
48
54
 
49
- **Introduce Shuri to the game as a new sprite**
55
+ **Introduce Shuri to the game as a new sprite.**
50
56
 
51
57
  ---
52
58
 
53
- - :paper plane: From ``||sprites:Sprites||``, drag
54
- ``||variables:set [mySprite] to sprite [ ] of kind [Player]||``
55
- into **the end** of the
59
+ - :paper plane: From ``||sprites:Sprites||``, grab
60
+ ``||variables(sprites):set [mySprite] to sprite [ ] of kind [Player]||``
61
+ and drag it into **the end** of the <br/>
56
62
  ``||loops(noclick):on start||`` container.
57
63
 
58
- - :mouse pointer: Click on ``||variables:[mySprite]||`` **inside of**<br/>
59
- ``||variables:set [mySprite] to sprite [ ] of kind [Player]||``<br/>
60
- and select <br/>
61
- ``||variables(noclick):Rename variable...||``. <br/>
62
- Rename it to **Shuri**.
64
+ - :mouse pointer: Now find your<br/>
65
+ ``||variables(noclick):set [mySprite] to sprite [ ] of kind [Player]||``<br/>
66
+ block in the workspace and click on the name ``||variables(noclick):mySprite||``. <br/>
67
+ Select **Rename variable...** and enter **Shuri**.
63
68
 
64
- - :paint brush: Click the grey box in the new block to open the **image editor**.
65
- Select the image for 'Shuri' in **My Assets**.
69
+ - :paint brush: Click the empty grey box in the same block to open the **image editor**.
70
+ Switch to **My Assets** again and select **Shuri**.
66
71
 
67
72
  ![Choose Shuri](/static/tutorials/wakanda/shuri.png " ")
68
73
 
69
74
 
70
- _💡 Switch over to **My Assets** to choose the image for 'Shuri'._
71
-
72
75
  ```blocks
73
76
  scene.setBackgroundImage(assets.image`wakanda`)
74
77
  //@highlight
@@ -78,7 +81,7 @@ let Shuri = sprites.create(assets.image`shuri`, SpriteKind.Player)
78
81
  ## {Step 5}
79
82
 
80
83
 
81
- **Allow Shuri to move inside the screen boundary**
84
+ **Allow Shuri to move inside the screen boundary.**
82
85
 
83
86
  We need to give Shuri the ability move around when the controller buttons are pressed.
84
87
 
@@ -123,34 +126,65 @@ controller.moveSprite(Shuri)
123
126
  Shuri.setStayInScreen(true)
124
127
  ```
125
128
 
126
- ## {Step 7}
127
129
 
128
130
 
129
- **Add Namor to the game as Shuri's enemy**
131
+
132
+ ## {7. Check Your Game!}
133
+
134
+
135
+ - :binoculars: Look at your project in the game window!
136
+
137
+ You should see Shuri and be able to move her around with the arrow keys when hovering over the controls.
138
+
139
+
140
+
141
+
142
+
143
+
144
+ ## {Step 8}
145
+
146
+
147
+ **Add Namor to the game.**
130
148
 
131
149
  ---
132
150
 
133
- - :paper plane: From ``||sprites:Sprites||``, drag
134
- ``||variables:set [mySprite] to sprite [ ] of kind [Player]||``
151
+ - :paper plane: From ``||sprites:Sprites||``, drag <br/>
152
+ ``||variables(sprites):set [mySprite] to sprite [ ] of kind [Player]||``<br/>
135
153
  into **the end** of the
136
154
  ``||loops(noclick):on start||`` container.
137
155
 
138
- - :mouse pointer: Click on ``||variables:[mySprite]||`` **inside of**<br/>
139
- ``||variables:set [mySprite] to sprite [ ] of kind [Player]||``<br/>
140
- and select <br/>
141
- ``||variables(noclick):Rename variable...||``. <br/>
142
- Rename it to **Namor**.
156
+ - :mouse pointer: Find the new<br/>
157
+ ``||variables(noclick):set [mySprite] to sprite [ ] of kind [Player]||``<br/>
158
+ block in the workspace and click on the name ``||variables(noclick):mySprite||``. <br/>
159
+ Select **Rename variable...** and enter **Namor**.
143
160
 
144
- - :paint brush: Click the grey box in the new block to open the **image editor**.
145
- Select the image for 'Namor' in **My Assets**.
161
+ - :paint brush: Click the empty grey box in the same block to open the **image editor**.
162
+ Switch to **My Assets** again and select **Namor**.
146
163
 
147
164
  ![Choose Namor](/static/tutorials/wakanda/namor.png " ")
148
165
 
149
- _💡 Switch over to **My Assets** to choose the image for 'Namor'._
150
166
 
151
- - :mouse pointer: Click on ``||sprites(noclick):[Player]||`` in<br/>
167
+ ```blocks
168
+ scene.setBackgroundImage(assets.image`wakanda`)
169
+ let Shuri = sprites.create(assets.image`shuri`, SpriteKind.Player)
170
+ controller.moveSprite(Shuri)
171
+ Shuri.setStayInScreen(true)
172
+ //@highlight
173
+ let Namor = sprites.create(assets.image`namor`, SpriteKind.Player)
174
+ ```
175
+
176
+
177
+ ## {Step 9}
178
+
179
+
180
+ **Make Namor the Enemy.**
181
+
182
+ ---
183
+
184
+ - :mouse pointer: In the<br/>
152
185
  ``||variables(noclick):set [Namor] to sprite [ ] of kind [Player]||``<br/>
153
- and change it to ``||sprites(noclick):Enemy||``.
186
+ block that you just created, click on ``||sprites(noclick):Player||``<br/>
187
+ and change the kind to ``||sprites(noclick):Enemy||``.
154
188
 
155
189
  ```blocks
156
190
  scene.setBackgroundImage(assets.image`wakanda`)
@@ -161,19 +195,19 @@ Shuri.setStayInScreen(true)
161
195
  let Namor = sprites.create(assets.image`namor`, SpriteKind.Enemy)
162
196
  ```
163
197
 
164
- ## {Step 8}
198
+ ## {Step 10}
165
199
 
166
200
 
167
201
  We want Namor to start in the upper corner of the screen.
168
202
 
169
203
  ---
170
204
 
171
- - :paper plane: From ``||sprites:Sprites||``, pull out <br/>
205
+ - :paper plane: From the ``||sprites:Sprites||`` category, grab <br/>
172
206
  ``||sprites:set [mySprite] position to x [0] y [0]||``<br/>
173
- and drop it inside at **the end** of ``||loops(noclick):on start||``.<br/>
207
+ and snap it in at **the end** of the ``||loops(noclick):on start||`` container.<br/>
174
208
 
175
209
 
176
- - :mouse pointer: Click ``||variables(noclick):[mySprite]||`` and change to it ``||variables(noclick):Namor||``.<br/>
210
+ - :mouse pointer: Click ``||variables(noclick):mySprite||`` and choose ``||variables(noclick):Namor||``.<br/>
177
211
  Set **x** to **148** and **y** to **2**.
178
212
 
179
213
 
@@ -187,19 +221,19 @@ let Namor = sprites.create(assets.image`namor`, SpriteKind.Enemy)
187
221
  Namor.setPosition(148, 2)
188
222
  ```
189
223
 
190
- ## {Step 9}
224
+ ## {Step 11}
191
225
 
192
226
 
193
227
  Let's add the code that makes Namor chase Shuri all around the screen.
194
228
 
195
229
  ---
196
230
 
197
- - :paper plane: From ``||sprites:Sprites||``, pull out <br/>
231
+ - :paper plane: From the ``||sprites:Sprites||`` category, grab <br/>
198
232
  ``||sprites:set [myEnemy] follow [mySprite]||`` <br/>
199
- and snap it in at **the end** of ``||loops(noclick):on start||``.
233
+ and snap it in at **the end** of the ``||loops(noclick):on start||`` container in the workspace.
200
234
 
201
- - :mouse pointer: Click ``||variables(noclick):[myEnemy]||`` and change it to ``||variables(noclick):Namor||``.<br/>
202
- Click on ``||variables(noclick):[mySprite]||`` and change to ``||variables(noclick):Shuri||``.<br/>
235
+ - :mouse pointer: Click ``||variables(noclick):myEnemy||`` and change it to ``||variables(noclick):Namor||``.<br/>
236
+ Click on ``||variables(noclick):mySprite||`` and change to ``||variables(noclick):Shuri||``.<br/>
203
237
  Click the plus **(+)** icon to expand the block and change the speed to **30**.
204
238
 
205
239
 
@@ -215,96 +249,123 @@ Namor.setPosition(148, 2)
215
249
  Namor.follow(Shuri, 30)
216
250
  ```
217
251
 
218
- ## {Step 10}
219
252
 
220
- **When Namor attacks Shuri, she should lose life points!**
253
+ ## {12. Check Your Game!}
254
+
255
+
256
+ - :binoculars: Don't forget to look at your project in the game window after each step!
257
+
258
+ Play with your project as you go along. This will help make sure you're on the right track.
221
259
 
222
- Let's make sure the game detects when Namor gets to Shuri using a sprite overlap event.
260
+
261
+
262
+
263
+
264
+ ## {Step 13}
265
+
266
+ **When Namor attacks Shuri, she should lose lives.**
267
+
268
+ Let's use a sprite overlap event to make sure the game detects when Namor gets to Shuri.
223
269
 
224
270
  ---
225
271
 
226
- - :paper plane: From ``||sprites:Sprites||``, grab <br/>
272
+ - :paper plane: From the ``||sprites:Sprites||`` category, grab <br/>
227
273
  ``||sprites:on [sprite] of kind [Player] overlaps [othersprite] of kind [Player]||``<br/>
228
274
  and drop it into an **empty area** of the workspace.
229
275
 
230
276
 
231
- - :mouse pointer: Change the sprite **kind** of ``||variables(noclick):[otherSprite]||`` from ``||sprites(noclick):[Player]||`` to ``||sprites(noclick):[Enemy]||``.
277
+ - :mouse pointer: Change the **kind** of **otherSprite** from ``||sprites(noclick):Player||`` to ``||sprites(noclick):Enemy||``.
232
278
 
233
- - :id card: To subtract a life from Shuri, go into ``||info:Info||`` and get the ``||info:change life by -1||``.<br/>
234
- Snap this inside of the <br/>
235
- ``||sprites:on [sprite] of kind [Player] overlaps [othersprite] of kind [Enemy]||``<br/> event block.<br/>
236
-
237
- - :mouse pointer: Send Namor back to the corner of the screen by duplicating<br/>
238
- the ``||sprites(noclick):set Namor position to x 148 y 2||`` block from <br/>
239
- ``||loops(noclick):on start||`` and placing the copy into<br/>
240
- ``||sprites:on [sprite] of kind [Player] overlaps [othersprite] of kind [Enemy]||``.
279
+ - :id card: To subtract a life from Shuri, open ``||info:Info||`` and grab<br/>
280
+ ``||info:change life by -1||``.<br/>
281
+ Snap this into the empty <br/>
282
+ ``||sprites(onclick):on [sprite] of kind [Player] overlaps [othersprite] of kind [Enemy]||``<br/> event block in the workspace.<br/>
241
283
 
242
284
 
243
285
  ```blocks
244
286
  sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
245
287
  info.changeLifeBy(-1)
246
- otherSprite.setPosition(148, 2)
247
288
  })
248
289
  ```
249
290
 
250
- ## {Step 11}
251
291
 
252
- **Shuri needs some life points to start with!**
292
+
293
+ ## {Step 14}
294
+
295
+ **If Namor and Shuri continue to overlap, Shuri will lose all of her lives too soon.**
296
+
297
+ Let's move Namor away to keep the game going.
253
298
 
254
299
  ---
255
300
 
256
- - :id card: Grab ``||info:set life to [3]||`` from ``||info:Info||``<br/>
257
- and snap it in at **the beginning** of the ``||loops(noclick):on start||`` container already in the workspace.
301
+ - :mouse pointer: Send Namor back to the corner of the screen by duplicating<br/>
302
+ the ``||sprites(noclick):set Namor position to x 148 y 2||`` block that's inside the<br/>
303
+ ``||loops(noclick):on start||`` container.
304
+
305
+ ~hint How do I duplicate? 💡
306
+
307
+ ---
308
+
309
+ There are two great ways to duplicate a block
310
+
311
+ 1) Highlight it and use the copy/paste feature on your keyboard
312
+ 2) Right-click the block and choose **Duplicate**.
313
+
314
+ hint~
315
+
316
+
317
+ - :mouse pointer: Place the copy into the<br/>
318
+ ``||sprites(onclick):on [sprite] of kind [Player] overlaps [othersprite] of kind [Enemy]||`` container already in the workspace.
258
319
 
259
- - :mouse pointer: Change **3** to **2**.
260
320
 
261
321
  ```blocks
262
- //@highlight
263
- info.setLife(2)
264
- scene.setBackgroundImage(assets.image`wakanda`)
265
- let Shuri = sprites.create(assets.image`shuri`, SpriteKind.Player)
266
- controller.moveSprite(Shuri)
267
- Shuri.setStayInScreen(true)
268
- let Namor = sprites.create(assets.image`namor`, SpriteKind.Enemy)
269
- Namor.setPosition(148, 2)
270
- Namor.follow(Shuri, 30)
322
+ sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSprite) {
323
+ let Namor: Sprite = null
324
+ info.changeLifeBy(-1)
325
+ //% @highlight
326
+ Namor.setPosition(148, 2)
327
+ })
271
328
  ```
272
329
 
273
- ## {Step 12}
330
+
331
+
332
+
333
+ ## {Step 15}
274
334
 
275
335
  **Bring in the guards!**
276
336
 
277
- Both Riri and Okoye can now join the game to help Shuri and guard her from Namor's attacks.
337
+ Both Riri and Okoye can now join the game to guard Shuri from Namor's attacks.
278
338
 
279
339
  - :paper plane: From ``||sprites:Sprites||``, drag another<br/>
280
- ``||variables:set [mySprite] to sprite [ ] of kind [Player]||`` <br/>
340
+ ``||variables(sprites):set [mySprite] to sprite [ ] of kind [Player]||`` <br/>
281
341
  into **the end** of the<br/>
282
342
  ``||loops(noclick):on start||`` container.
283
343
 
284
- - :mouse pointer: Click on ``||variables(noclick):[mySprite]||`` in<br/>
344
+ - :mouse pointer: Click on ``||variables(noclick):mySprite||`` in<br/>
285
345
  ``||variables(noclick):set [mySprite] to sprite [ ] of kind [Player]||``<br/>
286
346
  and select ``||variables(noclick):Rename variable...||``. Rename it to **Riri**.
287
347
 
288
- - :paint brush: Click the grey box in the new block to open the **image editor**.
289
- Select the image for 'Riri' in **My Assets**.
348
+ - :mouse pointer: Click the empty grey box to open the **image editor**.
349
+
350
+ - :paint brush: Switch to **My Assets** to select the image for 'Riri'.
290
351
  ![Choose Riri](/static/tutorials/wakanda/riri.png " ")
291
352
 
292
353
 
293
354
 
294
- - :lightbulb: Repeat the steps you did to make Riri but this time rename<br/>
295
- ``||variables(noclick):[mySprite]||`` to **Okoye** and pick the 'okoye' image from the image editor.
355
+ - :lightbulb: Repeat the steps you took to add Riri, but this time rename<br/>
356
+ ``||variables(noclick):mySprite||`` to **Okoye** and pick the 'okoye' image from **My Assets**
296
357
  ![Choose Okoye](/static/tutorials/wakanda/okoye.png " ")
297
358
 
298
359
 
299
360
  - :mouse click: Change the **kind** of both **Riri** and **Okoye** from<br/>
300
- ``||sprites(noclick):[Player]||`` to ``||sprites(noclick):[Guard]||``.
361
+ ``||sprites(noclick):Player||`` to ``||sprites(noclick):Guard||``.
301
362
 
302
363
 
303
364
  ```blocks
304
365
  namespace SpriteKind {
305
366
  export const Guard = SpriteKind.create()
306
367
  }
307
- info.setLife(2)
368
+
308
369
  scene.setBackgroundImage(assets.image`wakanda`)
309
370
  let Shuri = sprites.create(assets.image`shuri`, SpriteKind.Player)
310
371
  controller.moveSprite(Shuri)
@@ -316,7 +377,7 @@ let Riri = sprites.create(assets.image`riri`, SpriteKind.Guard)
316
377
  let Okoye = sprites.create(assets.image`okoye`, SpriteKind.Guard)
317
378
  ```
318
379
 
319
- ## {Step 13}
380
+ ## {Step 16}
320
381
 
321
382
  **Make the guards move**
322
383
 
@@ -341,7 +402,7 @@ into the **end of** the ``||loops(noclick):on start||`` container already in the
341
402
  namespace SpriteKind {
342
403
  export const Guard = SpriteKind.create()
343
404
  }
344
- info.setLife(2)
405
+
345
406
  scene.setBackgroundImage(assets.image`wakanda`)
346
407
  let Shuri = sprites.create(assets.image`shuri`, SpriteKind.Player)
347
408
  controller.moveSprite(Shuri)
@@ -355,43 +416,60 @@ let Okoye = sprites.create(assets.image`okoye`, SpriteKind.Guard)
355
416
  controller.moveSprite(Okoye, -68, -58)
356
417
  ```
357
418
 
358
- ## {Step 14}
359
-
360
- **If one of the guards can catch Namor, add a point to the game score.**
419
+ ## {Step 17}
361
420
 
362
- Namor should go back to his corner and start to attack again after being caught.
421
+ **You need an event to tell when one of the guards overlaps with Namor.**
363
422
 
364
423
  ---
365
424
 
366
- - :paper plane: In ``||sprites:Sprites||``, grab <br/>
425
+ - :paper plane: From ``||sprites:Sprites||``, grab <br/>
367
426
  ``||sprites:on [sprite] of kind [player] overlaps [othersprite] of kind [player]||``<br/>
368
427
  and drop it into **an empty area** of the workspace.
369
428
 
370
- - :mouse pointer: Change the **sprite** kind from ``||sprites(noclick):Player||`` to ``||sprites(noclick):Guard||`` and the **othersprite** kind from ``||sprites(noclick):Player||`` to ``||sprites(noclick):Enemy||``.
429
+ - :mouse pointer: Change the **sprite** kind to ``||sprites(noclick):Guard||`` and the **othersprite** kind to ``||sprites(noclick):Enemy||``.
430
+
431
+
432
+ ```blocks
433
+ namespace SpriteKind {
434
+ export const Guard = SpriteKind.create()
435
+ }
436
+ sprites.onOverlap(SpriteKind.Guard, SpriteKind.Enemy, function (sprite, otherSprite) {
437
+
438
+ })
439
+ ```
440
+
441
+
442
+ ## {Step 18}
443
+
444
+ Award a point, then Namor should go back to his corner and start to attack again after being caught.
445
+
446
+ ---
447
+
371
448
 
372
449
  - :id card: From ``||info:Info||``, add a point to the game score by snapping <br/>
373
450
  ``||info:change score by 1||``<br/>
374
- inside this new event.
451
+ into the empty **on overlaps** container.
375
452
 
376
- - :paper plane: Send Namor back to the corner of the screen by snapping
377
- a new
378
- <br/>
379
- ``||sprites:set [mySprite] position to x [0] y [0]||``<br/>
380
- block into the same overlap event.
381
-
382
- - :mouse pointer: Change ``||variables(noclick):MySprite||`` to ``||variables(noclick):Namor||``. Change **x** to **148**, and **y** to **2**.
453
+ - :mouse pointer: Send Namor back to the corner of the screen by duplicating<br/>
454
+ the ``||sprites(noclick):set Namor position to x 148 y 2||`` block from<br/>
455
+ ``||loops(noclick):on start||`` container again.
456
+ <br/><br/>Place the copy into the<br/>
457
+ ``||sprites(onclick):on [sprite] of kind [Guard] overlaps [othersprite] of kind [Enemy]||`` container already in the workspace.
383
458
 
384
459
  ```blocks
385
460
  namespace SpriteKind {
386
461
  export const Guard = SpriteKind.create()
387
462
  }
388
463
  sprites.onOverlap(SpriteKind.Guard, SpriteKind.Enemy, function (sprite, otherSprite) {
464
+ let Namor: Sprite = null
389
465
  info.changeScoreBy(1)
390
- otherSprite.setPosition(148, 2)
466
+ Namor.setPosition(148, 2)
391
467
  })
392
468
  ```
393
469
 
394
- ## {Step 15}
470
+
471
+
472
+ ## {Step 19}
395
473
 
396
474
  **Let's decide when Shuri, with the help Riri and Okoye, will win against Namor's attacks.**
397
475
 
@@ -415,24 +493,19 @@ and snap it inside the new score event.
415
493
  ``||scene: set background image to [ ]||``<br/>
416
494
  and drop it in at **the end** of the same event.
417
495
 
418
- - :paint brush: Click the empty grey square and switch to **My Assets** to select the Boston Bridge scene.
419
-
420
- - :paper plane: From ``||game:Game||``, grab <br/>
421
- ``||game:game over <LOSE>||`` <br/>
422
- and put it in at **the end of** the event.
423
-
424
- - :mouse pointer: Switch `<LOSE>` to `<WIN>`.
496
+ - :paint brush: Click the empty grey square and switch to **My Assets** to select the **Boston Bridge scene**.
425
497
 
426
498
  ```blocks
427
499
  let Namor: Sprite = null
428
500
  info.onScore(20, function () {
429
501
  Namor.destroy()
430
502
  scene.setBackgroundImage(assets.image`boston-bridge`)
431
- game.over(true)
432
503
  })
433
504
  ```
434
505
 
435
- ## {Step 16}
506
+
507
+
508
+ ## {Step 20}
436
509
 
437
510
  **Celebrate the victory!**
438
511
 
@@ -442,21 +515,16 @@ Make defeating Namor a much more dramatic event. Add some effects and messages t
442
515
  ---
443
516
 
444
517
 
445
- - :tree: Get a <br/>``||scene:start screen [confetti] effect||``<br/> from ``||scene:Scene||`` and place it inside at **the end** of the score event.
446
-
447
- - :circle: From ``||game: Game||``, display a message by snapping<br/>
448
- ``||game:show long text " " [bottom]||``<br/>
449
- in after the confetti effect.
518
+ - :tree: Get a <br/>``||scene:start screen [confetti] effect||``<br/> from ``||scene:Scene||`` and place it inside at **the end** of the ``||info(noclick):on score 20||`` event.
450
519
 
451
- - :mouse pointer: Add the message `"We are safe!"` to the text block.
452
-
453
- - :paper plane: Make Shuri shout "WAKANDA FOREVER".<br/><br/>
454
- Add the <br/>``||sprites:[mySprite] say [":)"]||``<br/>
455
- block from ``||sprites:Sprites||``.
520
+ - :paper plane: From the ``||sprites:Sprites||`` category, drag<br/>
521
+ ``||sprites:[mySprite] say [":)"]||``<br/>
522
+ into the **end of** the ``||info(noclick):on score 20||`` block already in the workspace.
456
523
 
457
524
  - :mouse pointer: Change ``||variables(noclick):mySprite||`` to ``||variables(noclick):Shuri||``.
458
525
 
459
- - :mouse pointer: Click the smiley face in the circle and enter **WAKANDA FOREVER**, then click the (+) icon and set the display time to **5000** ms.
526
+ - :mouse pointer: Click the smiley face in the circle and enter **WAKANDA FOREVER!**, then click the (+) icon and set the display time to **2 seconds** (it will automatically change to 2000 ms.)
527
+
460
528
 
461
529
  ```blocks
462
530
  let Shuri: Sprite = null
@@ -464,44 +532,35 @@ let Namor: Sprite = null
464
532
  info.onScore(20, function () {
465
533
  Namor.destroy()
466
534
  scene.setBackgroundImage(assets.image`boston-bridge`)
467
- game.over(true)
468
535
  effects.confetti.startScreenEffect()
469
- game.showLongText("We are safe!", DialogLayout.Bottom)
470
- Shuri.sayText("WAKANDA FOREVER!", 5000, false)
536
+ Shuri.sayText("WAKANDA FOREVER!", 2000, false)
471
537
  })
472
538
  ```
473
539
 
474
- ## {Step 17}
475
-
476
-
477
- **Instructions please!**
478
540
 
479
- Now that the game is mostly complete, let's give the player some brief instructions on how to play.
480
-
481
- ---
482
541
 
483
- - :circle: Grab **three more** <br/>
484
- ``||game(noclick):show long text " " [bottom]||``<br/>
485
- blocks and snap them in at **the top** of the ``||loops(noclick):on start||`` container already in the workspace.
542
+ ## {Step 21}
486
543
 
544
+ **Be a leader!**
487
545
 
488
- - :mouse pointer: Change ``||game(noclick):bottom||`` to ``||game(noclick):full screen||`` on each of them.
546
+ Teach users how to play with well-placed instructions.
489
547
 
548
+ ---
490
549
 
491
- - :mouse pointer: Click the text area of the first and set the message to something like: <br/>_"Help Shuri, Okoye and Riri escape Namor. (Press the \"A\" button to go to the next screen.)"_
550
+ - :circle: From the ``||game:Game||`` category, grab <br/>
551
+ ``||game(noclick):show long text "..." [full screen]||``<br/>
552
+ and snap it in at **the top** of the ``||loops(noclick):on start||`` container already in the workspace.
492
553
 
493
- - :mouse pointer: Click the text area for the second and set the message to something like: <br/>_"When game begins, press the ARROW KEYS to move Shuri, Okoye and Riri. If Namor catches you, you will lose points!"_
554
+ Now, when your game starts, users will see a message suggesting that they use the arrow keys to play.
494
555
 
495
- - :mouse pointer: Click the text area of the third and set the message to something like: <br/>_"Earn 20 points to win and to stay alive you must keep your heart(s)."_
496
556
 
497
557
  ```blocks
498
558
  namespace SpriteKind {
499
559
  export const Guard = SpriteKind.create()
500
560
  }
501
- game.showLongText("Help Shuri, Okoye and Riri escape Namor. (Press the \"A\" button to go to the next screen.)", DialogLayout.Full)
561
+
562
+ //@highlight
502
563
  game.showLongText("When game begins, press the ARROW KEYS to move Shuri, Okoye and Riri. If Namor catches you, you will lose points! ", DialogLayout.Full)
503
- game.showLongText("Earn 20 points to win and to stay alive you must keep your heart(s).", DialogLayout.Full)
504
- info.setLife(2)
505
564
  scene.setBackgroundImage(assets.image`wakanda`)
506
565
  let Shuri = sprites.create(assets.image`shuri`, SpriteKind.Player)
507
566
  controller.moveSprite(Shuri)
@@ -515,7 +574,9 @@ let Okoye = sprites.create(assets.image`okoye`, SpriteKind.Guard)
515
574
  controller.moveSprite(Okoye, -68, -58)
516
575
  ```
517
576
 
518
- ## {Step 18}
577
+
578
+
579
+ ## {Step 21}
519
580
 
520
581
  **🎉 Congratulations**
521
582
 
@@ -526,7 +587,9 @@ Now you have a game that helps Shuri, Riri, and Oyoke defeat Namor! Go ahead and
526
587
  Click **Done** when you're ready to publish your game and share with friends.
527
588
 
528
589
 
529
-
590
+ ```blockconfig.global
591
+ game.showLongText("When game begins, press the ARROW KEYS to move Shuri, Okoye and Riri. If Namor catches you, you will lose points! ", DialogLayout.Full)
592
+ ```
530
593
 
531
594
  ```package
532
595
  wakanda-palette=github:riknoll/wakanda-palette
@@ -553,7 +616,3 @@ namespace SpriteKind {
553
616
  "tilemap.g.ts": "// Auto-generated code. Do not edit.\nnamespace myTiles {\n //% fixedInstance jres blockIdentity=images._tile\n export const transparency16 = image.ofBuffer(hex``);\n\n helpers._registerFactory(\"tile\", function(name: string) {\n switch(helpers.stringTrim(name)) {\n case \"transparency16\":return transparency16;\n }\n return null;\n })\n\n}\n// Auto-generated code. Do not edit.\n"
554
617
  }
555
618
  ```
556
-
557
- ```package
558
- wakanda-palette=github:riknoll/wakanda-palette
559
- ```