aHaH
aHaH

Reputation: 223

NetLogo - How to show the current coordinates of a turtle

I have been trying for quite some time to show the current coordinates of a turtle in NetLogo. I'm aware that to show one of the coordinates, I could use:

show [xcor] of turtle 0

or

show [ycor] of turtle 0

But how do I show both coordinates?

Thank you.

Upvotes: 6

Views: 14943

Answers (3)

maycca
maycca

Reputation: 4090

if you don't know the exact turtle (of turtle 5) who's coordinates you would like to show but you want to identify the position of specific turtle running a process you can use just

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

Upvotes: 3

Nicolas Payette
Nicolas Payette

Reputation: 14972

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

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

Upvotes: 11

kenam
kenam

Reputation: 135

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

you can do

show [xcor + ycor] of turtle 5

But not sure if that helps?

sorry.. it doesnt.. 1 sec!

Upvotes: -4

Related Questions