Domanda

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.

È stato utile?

Soluzione

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

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

Altri suggerimenti

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

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!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top