How to Create a Procedure

Tutorial Level:
2. Intermediate

A procedure, in StarLogo, contains a set of instructions or commands that an agent can call to execute within the program. Procedures are useful when you want to use a set of instructions multiple times or when you want to break down a complicated task into discrete parts and program each part separately in an easy-to-read way. This tutorial will show you how to create a simple procedure that makes agents in Spaceland move randomly.

Webpage PDF