Build an Epidemic Model (part 3 of 8)

Tagged:

Previous: Seeding the Infection (part 2 of 8)

Motion

Let's get the agents in motion. Navigate to the Runtime space of the Canvas by using the scrollbars or minimap.

Grab a Forever block from the Setup and Run tab and put it on the Runtime space. Change the name of the Forever block to Run by clicking on the text and editing the name.

From the Movement tab get a Forward block, then a Right Block, and then a Left block and attach them to the Forever Block.

Delete the 90 from the Left and Right blocks by dragging those numbers to the trash.

Drag Random blocks from the Math tab and attach them to the Left and Right blocks. Now the Agents should move forward 1 and then turn a little to the left or right randomly.

Go to the Runtime view again and click once on your Run block. A green highlight around the Run block shows that the program is running.

Next: Part 4 of 8 - Infection Back To Top