NetLogo - How to show the current coordinates of a turtle

I have been trying for some time to show the current turtle coordinates in NetLogo. I know that to display one of the coordinates I could use:

show [xcor] of turtle 0 

or

 show [ycor] of turtle 0 

But how can I show both coordinates?

Thanks.

+4
source share
3 answers

You can show [list xcor ycor] of turtle 0 .

Or, fancier: show [(word "(" xcor ", " ycor ")")] of turtle 0 .

+7
source

if you do not know the exact tortoise ( of turtle 5 ) whose coordinates you would like to show, but you want to determine the position of a particular tortoise performing a process that you can only use

 show list xcor ycor ; not need to use self or myself 
+2
source

From http://ccl.northwestern.edu/netlogo/docs/programming.html#syntax

You can do

show [xcor + ycor] turtles 5

But not sure if this helps?

sorry .. it's not .. 1 sec!

-3
source

Source: https://habr.com/ru/post/1393954/


All Articles