Erase Button

15 views
Skip to first unread message

Ziwei LIN

unread,
Oct 11, 2022, 2:41:21 PM10/11/22
to netlogo-users
Is it someone know how to setup a erase button to remove some of the urban land use, to interact the urban regeneration? 

Looking forward to receiving relevant response. Thank you.

Pradeesh Kumar K V

unread,
Oct 12, 2022, 1:46:57 AM10/12/22
to netlogo-users
I suppose you can use mouse-xcor and mouse-ycor commands to obtain the coordinates. Write a procedure to use these coordinates to delete a particular agent.

After writing the procedure, assign it to a button. Keep it on forever so that as long as the button is kept pressed, the turtles you click will get deleted.

Hope this works.

Best,

Pradeesh

On Wed, 12 Oct, 2022, 00:11 Ziwei LIN, <1840...@life.hkbu.edu.hk> wrote:
Is it someone know how to setup a erase button to remove some of the urban land use, to interact the urban regeneration? 

Looking forward to receiving relevant response. Thank you.

--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/32a888c5-57ba-4af1-96ca-8b4a2c9d4c06n%40googlegroups.com.

jeremy...@northwestern.edu

unread,
Oct 13, 2022, 9:46:16 AM10/13/22
to netlogo-users
The Mouse Example model that comes with NetLogo in the models library shows how to do some things like this.  If you want to erase or change turtles or patches instead of making or coloring them, you can get turtles within some radius of the mouse coordinates instead.  https://netlogoweb.org/launch#https://netlogoweb.org/assets/modelslib/Code%20Examples/Mouse%20Example.nlogo 

Good luck.

-Jeremy
Reply all
Reply to author
Forward
0 new messages