Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8330347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:05:47+00:00 2026-06-09T02:05:47+00:00

I need to learn concurrently when a turtle changes its heading. Namely, when the

  • 0

I need to learn concurrently when a turtle changes its heading. Namely, when the turtle changes its direction, a procedure or a reporter will change the value of a boolean. But this reporter won’t be called by any other procedures, it will be always running (checking turtle’s heading) while the turtle is moving. Is there any way of this in NetLogo?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:05:49+00:00Added an answer on June 9, 2026 at 2:05 am

    I think you can achieve something similar to what you want with a “forever” button: that is, a button that runs a procedure constantly. (People usually have at least one button like that, typically named “go”, in their models.)

    Assuming the heading you want to track is that of turtle 0, you can have code like this:

    globals [
      current-heading
      heading-has-changed
    ]
    
    to check-heading-changes
      if [ heading ] of turtle 0 != current-heading [
        set heading-has-changed true
        set current-heading [ heading ] of turtle 0
      ]
    end
    

    To have the check-heading-changes code run constantly, you just need to call it from a “forever” button:

    check-current-heading forever button

    You have to remember to click the forever button when you want to start the monitoring. Now, of course, the code above also assumes that you will have some other procedures running that controls the turtle, and also that will actually do something (and reset the variable) when heading-has-changed becomes true.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to learn couchbd and have been going through tutorials on views. I
I need to learn how to convert type to Class in C#. In my
I need to learn more about creating setup projects from within Visual Studio to
I need to learn RegEx but don't have time to figure this out right
I need to learn C++ in order to learn building Nokia WRT and or
Do I need to learn the WCF Service trace viewer tool? I understand I
Do i need to learn Java for running hadoop in Amazon EC2? I am
I'm lately feeling the need to learn a build tool. I'm looking through StackOverflow
I am a newbie in Obj-C. I need to learn this better so please
I can do a few things with PowerPoint, but I need to learn more

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.