Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I'm working on a code for clearing the waypoint course
#3
Hey, I tried exactly what you said, and it worked perfectly! I don't entirely understand why the if block has to go between the radar and goto lines, but I guess it's just because the flow of the programming language doesn't work like regular old English. Or maybe I just need to practice more and reimagine it in my head.

I mean, it kind of makes sense. When I wrote it, I was trying to say "You're objective is an item. While it rings true there is an item, look (radar) for the item WayPoint and goto it. If it is no longer true that there is a WayPoint, stop (break) what you're doing and turn 90 degrees to the left, and move 20 meters out."

Instead, it should have been, "You're objective is an item. While it rings true that you are looking for an item, look (radar) for the item WayPoint. If you do not see any more WayPoints (item == null), stop (break) looking for it, turn 90 degrees to the left, and move 20 meters out. Now, goto the first WayPoint that you see."


Messages In This Thread
RE: I'm working on a code for clearing the waypoint course - by {No}Mad - 07-20-2018, 07:46 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)