Reputation: 23
I have seen similar questions but haven't found what I needed yet... Was wondering if anyone knew how to set specific locations for turtles at NetLogo Setup?
Currently tried:
to setup
create-turtles 5
set turtles at-points [[-12 20 ] [-11 19] [-12 18 ] [-18 18 ] [-11 17]]
but they're all showing up at [0 0]
Thanks!
Upvotes: 0
Views: 528
Reputation: 2926
This can be done in many ways:
setxy
in the create-turtles
command block. In most models you will see this is used in combination with random-xcor
and random-ycor
to give each turtle a random location, but you can also use it in any other way.move-to
to ask a specific turtle or group of turtles to go to a specific agent (e.g. to a specific patch).sprout
to directly ask a specific patch or group of patches to create turtles there.In any case, I suggest you take a look at the NetLogo Programming Guide and the NetLogo Dictionary
Upvotes: 2