HƯỚNG DẪN ICT CROCODILE TUTOR MINH HỌA

1. Tutorial - Creating and monitoring a flowchart
2. Tutorial - Creating and using a function
3. Tutorial - Getting and setting part properties
4. Tutorial - Using the `On button press` part
5. Tutorial - Constructing a dance routine
6. Tutorial - Programming a character`s speech
7. Tutorial - Setting a context
8. Tutorial - Using scenes
9. Phụ lục: Contextualising a model
HƯỚNG DẪN ICT CROCODILE TUTOR MINH HỌA

3. Tutorial - Getting and setting part properties
Instructions
In this tutorial, we`ll set up a simple flowchart that checks the state of a chip pan and turns a smoke alarm on if the chip pan is on fire.
1. From the Parts pane (Lesson Kits > Context Parts > House (inside)) drag onto your scene a pan button and a smoke alarm animation.
2. From the Parts pane, add a start flowchart part.
3. We need to check the value of the pan button (that is, whether it is on or off) and then set the smoke alarm animation so that it is on. Drag on a get property part from the Parts pane so that it connects directly with the start part.

Hướng dẫn
Trong hướng dẫn này, chúng tôi sẽ thiết lập một sơ đồ đơn giản để kiểm tra trạng thái của chảo chip và bật cảnh báo khói nếu chảo chip đang cháy.
1. Từ ngăn Bộ phận (Bộ bài học> Bộ phận ngữ cảnh> Ngôi nhà (bên trong)), kéo vào cảnh của bạn một nút xoay và hoạt ảnh cảnh báo khói.
2. Từ ngăn Bộ phận, thêm một phần sơ đồ bắt đầu.
3. Chúng ta cần kiểm tra giá trị của nút pan (tức là nó đang bật hay tắt) rồi đặt hoạt cảnh báo khói để nó bật. Kéo một phần thuộc tính get từ ngăn Bộ phận để nó kết nối trực tiếp với phần bắt đầu.
1
3
2
1
3
HƯỚNG DẪN ICT CROCODILE TUTOR MINH HỌA

3. Tutorial - Getting and setting part properties
4. Associate the get property part to the pan using the target tool. Now click on `Property` to select the property of the pan button whose value will be stored in the variable x. Select `Value`.
5. The `value` property of a button is of Boolean type, so it is TRUE when the button is pressed and FALSE when it is not pressed. So to test whether the button is pressed (and the pan is on fire), drag on a test variable part and connect it directly to the set variable part.
6. We want to see whether x is TRUE, so click on the `0` on the test variable part and enter  `TRUE` instead. (Make sure you use upper case letters, or the flowchart will not run as expected.)

Dịch
4. Liên kết phần thuộc tính get với chảo bằng công cụ đích. Bây giờ hãy nhấp vào `Thuộc tính` để chọn thuộc tính của nút xoay có giá trị sẽ được lưu trữ trong biến x. Chọn giá trị`.
5. Thuộc tính `giá trị` của một nút là kiểu Boolean, vì vậy nó là TRUE khi nút được nhấn và FALSE khi không được nhấn. Vì vậy, để kiểm tra xem nút có được nhấn (và chảo đang cháy) hay không, hãy kéo phần biến kiểm tra và kết nối trực tiếp với phần biến đã đặt.
6. Chúng tôi muốn xem liệu x có phải là TRUE hay không, vì vậy hãy nhấp vào `0` trên phần biến kiểm tra và nhập `TRUE` để thay thế. (Hãy đảm bảo rằng bạn sử dụng các chữ cái viết hoa, nếu không lưu đồ sẽ không chạy như mong đợi.)
HƯỚNG DẪN ICT CROCODILE TUTOR MINH HỌA

3. Tutorial - Getting and setting part properties
7. If x is not TRUE, we need to keep checking the state of the button until it is pressed, so connect the `N` output of the test variable part to the input of the get property part.
8. If x is TRUE, then we want to set the fire alarm animation so that the alarm is on. Drag on a call action part and connect it directly to the `Y` output of the test variable part.
9. Associate the call action part to the smoke alarm animation and, selection the animation "Smoke alarm on" from its action menu.
10. Add a delay part from the Parts pane and connect it directly to the set property part.

Dịch
7. Nếu x không TRUE, chúng ta cần tiếp tục kiểm tra trạng thái của nút cho đến khi nó được nhấn, vì vậy hãy kết nối đầu ra `N` của phần biến kiểm tra với đầu vào của phần thuộc tính get.
8. Nếu x là TRUE, thì chúng ta muốn đặt hoạt cảnh báo cháy để báo động được bật. Kéo phần hành động gọi và kết nối trực tiếp với đầu ra `Y` của phần biến thử nghiệm.
9. Liên kết phần hành động kêu gọi với hoạt ảnh cảnh báo khói và chọn hoạt ảnh "Bật báo động khói" từ menu tác vụ của nó.
10. Thêm một phần trì hoãn từ ngăn Bộ phận và kết nối nó trực tiếp với phần thuộc tính đã đặt.
HƯỚNG DẪN ICT CROCODILE TUTOR MINH HỌA

3. Tutorial - Getting and setting part properties
11. Add a call action part to the scene and connect it directly to the delay part. Use it to change back to the "smoke alarm off" animation.
12. Add a stop part and connect it directly to the last set property part.
13. Now run the flowchart. Click on the pan to change its state. If the pan is on fire, the smoke alarm sounds for five seconds and then goes off.

Dịch
11. Thêm một phần hành động gọi vào cảnh và kết nối trực tiếp với phần trì hoãn. Sử dụng nó để thay đổi trở lại hoạt ảnh "tắt báo động khói".
12. Thêm một phần dừng và kết nối trực tiếp với phần thuộc tính được thiết lập cuối cùng.
13. Bây giờ hãy chạy lưu đồ. Nhấp vào chảo để thay đổi trạng thái của nó. Nếu chảo đang cháy, cảnh báo khói sẽ kêu trong 5 giây rồi tắt.
12
13
HƯỚNG DẪN ICT CROCODILE TUTOR MINH HỌA

2. Tutorial - Creating and using a function
10. Now run the flowchart and the distance (in pixels) between the two characters will appear in the Number part.
11. Move the characters and run the flowchart again to assure yourself that the function is working.

Dịch
10. Bây giờ hãy chạy lưu đồ và khoảng cách (tính bằng pixel) giữa hai ký tự sẽ xuất hiện trong phần Number.
11. Di chuyển các ký tự và chạy lại lưu đồ để đảm bảo với bạn rằng hàm đang hoạt động.
FUNCTION THÔNG DỤNG:
nguon VI OLET