Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+17 votes

I wanted to constantly move a turtle without setting the button to forever.

asked in CSC 150 January201920 by (1 point)

5 Answers

+9 votes

You don't need to use a "forever" button --that's just one way to get something to happen repeatedly in NetLogo. If you're feeling confused by the whole SETUP / GO button thing, then just write all of your video-creating code inside just ONE procedure, like this:

to make-video
  clear-all
  vid:start-recorder
  cro 5
  repeat 100 [
     ask turtles [
       forward 0.1
     ]
     vid:record-view
  ]
  vid:save-recording user-new-file
end
answered by (1.2k points)
+8 votes

I don't know how to do that however for the video part of the file you can keep on clicking on the button as quick or as slow as you would like.

answered by (1 point)
+7 votes

I think you can breed the single turtle to make it move the way you want without affecting other turtles. Moreover, you can put the turtle move into a repeat command to constantly move the turtle.

answered by (1 point)
+6 votes

you can also use the breed command and just use the specific turtle you want that way!

answered by (1 point)
0

the breed command is how I did this in my project

+4 votes

make only the turtle animated in the go function. Setup other objects at the beginning

answered by (1 point)
...