You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: computing/unit-4/lesson-1.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,13 @@
5
5
## Step 1
6
6
Rename the **run** element of the ``||Player:on chat command||`` block to **build_gates**.
7
7
8
-
Drag the ``||Agent:agent set active slot||`` code block to the coding Workspace and leave it set it to **1**.
8
+
Drag the ``||Agent:agent set active slot||`` code block to the coding Workspace and leave it set it to **1**. Then add a ``||Agent:agent move [forward]||`` block and use the drop-down menu to change it to **up**, and leave the number at **1**.
9
9
10
10
#### ~ tutorialhint
11
11
```blocks
12
12
player.onChat("build_gates", function () {
13
13
agent.setSlot(1)
14
+
agent.move(UP, 1)
14
15
})
15
16
```
16
17
@@ -21,6 +22,7 @@ Drag the ``||Loops:repeat [4] times||`` code block into your ``||Player:on chat
21
22
```blocks
22
23
player.onChat("build_gates", function () {
23
24
agent.setSlot(1)
25
+
agent.move(UP, 1)
24
26
for (let index = 0; index < 15; index++) {
25
27
26
28
}
@@ -36,6 +38,7 @@ Add an ``||Agent:agent move [forward]||`` code block to your main code, use the
36
38
```blocks
37
39
player.onChat("build_gates", function () {
38
40
agent.setSlot(1)
41
+
agent.move(UP, 1)
39
42
for (let index = 0; index < 15; index++) {
40
43
agent.place(DOWN)
41
44
agent.move(RIGHT, 1)
@@ -52,6 +55,7 @@ Drag another ``||Agent:agent move [forward]||`` code block to the coding Workspa
52
55
```blocks
53
56
player.onChat("build_gates", function () {
54
57
agent.setSlot(1)
58
+
agent.move(UP, 1)
55
59
for (let index = 0; index < 15; index++) {
56
60
agent.place(DOWN)
57
61
agent.move(RIGHT, 1)
@@ -71,6 +75,7 @@ Then also add a ``||Agent:agent move [forward]||`` code block from the ``||Agent
71
75
```blocks
72
76
player.onChat("build_gates", function () {
73
77
agent.setSlot(1)
78
+
agent.move(UP, 1)
74
79
for (let index = 0; index < 15; index++) {
75
80
agent.place(DOWN)
76
81
agent.move(RIGHT, 1)
@@ -90,6 +95,7 @@ Now we just need to get our ``||Agent:AGENT||`` to the next starting position to
90
95
```blocks
91
96
player.onChat("build_gates", function () {
92
97
agent.setSlot(1)
98
+
agent.move(UP, 1)
93
99
for (let index = 0; index < 15; index++) {
94
100
agent.place(DOWN)
95
101
agent.move(RIGHT, 1)
@@ -143,6 +149,7 @@ player.onChat("zoo_sign", function () {
143
149
})
144
150
player.onChat("build_gates", function () {
145
151
agent.setSlot(1)
152
+
agent.move(UP, 1)
146
153
for (let index = 0; index < 15; index++) {
147
154
agent.place(DOWN)
148
155
agent.move(RIGHT, 1)
@@ -174,6 +181,7 @@ player.onChat("zoo_sign", function () {
174
181
})
175
182
player.onChat("build_gates", function () {
176
183
agent.setSlot(1)
184
+
agent.move(UP, 1)
177
185
for (let index = 0; index < 15; index++) {
178
186
agent.place(DOWN)
179
187
agent.move(RIGHT, 1)
@@ -205,6 +213,7 @@ player.onChat("zoo_sign", function () {
205
213
})
206
214
player.onChat("build_gates", function () {
207
215
agent.setSlot(1)
216
+
agent.move(UP, 1)
208
217
for (let index = 0; index < 15; index++) {
209
218
agent.place(DOWN)
210
219
agent.move(RIGHT, 1)
@@ -236,6 +245,7 @@ player.onChat("zoo_sign", function () {
236
245
})
237
246
player.onChat("build_gates", function () {
238
247
agent.setSlot(1)
248
+
agent.move(UP, 1)
239
249
for (let index = 0; index < 15; index++) {
240
250
agent.place(DOWN)
241
251
agent.move(RIGHT, 1)
@@ -265,6 +275,7 @@ player.onChat("zoo_sign", function () {
0 commit comments