Turtles, patches and their moving sequentially from one patch to the next

后端 未结 1 1065
遥遥无期
遥遥无期 2021-01-17 02:23

Platfrom : NetLogo

  • Question

I want to move my flag specific 3 point

  • A(-12 8)
  • B(-5 12)
  • C(6 4)

-Wh

相关标签:
1条回答
  • 2021-01-17 03:10

    Have you tried to understand the answers you have already been given? In the setup, replace -10 5 with the first place you want to go to (which is -12 8). Then update the go code accordingly.

    to go
      ask flag-on patch -12 8
      [ set target patch -5 12
        face target
      ]
      ask flag-on patch -5 12
      [ set target patch 6 4
        face target
      ]
      ask flag with [ shape = "by" ]
      [ forward 1 ]
    end
    

    This is just the direction and moving. You need to try and do some code for the energy and dying etc. But do things gradually, get something working and then add the next piece.

    0 讨论(0)
提交回复
热议问题