Beginners Interactive NetLogo Dictionary
Farsi / Persian
NetLogo Models Library:
This example shows how to give a turtle a "halo", to make it stand out. The halo travels with the turtle.
The same technique might be useful in other ways as well. For example, you might use it to show the radius a turtle can sense things in.
Also, in this example, the halo is a circle, but you could use any shape you can draw in the shapes editor. You could vary the size, color, and shape of the halos however you want, to make many different kinds of indicators.
Note that the
watch command has a somewhat similar effect visually: it puts a "spotlight" on a turtle. But using the spotlight as an indicator is limited. You can only have one spotlight. You can't control the color of the spotlight. The size of the spotlight is determined by the size of the turtle being watched, and isn't otherwise adjustable. So if the spotlight isn't flexible enough for your needs, you may want to use the technique shown in this code example instead.
One thing the spotlight does that the technique in this code example can't do is darken everything outside the spotlight.
Improve the buttons in the Interface tab that create and destroy halos to include sanity/safety checks. The button that creates halos shouldn't put a halo on a turtle that already has one; the button that destroys halos shouldn't blow up if there are no halos left.
Note the use of the
Note the use of an RGB color with an alpha value to make partially transparent halos.
Label Position Example