Objects

10 views
Skip to first unread message

nram...@ellingtonps.net

unread,
Dec 11, 2014, 8:50:04 AM12/11/14
to starlo...@googlegroups.com
Student question:

"I have the object set heading 90 on red patch; then green it goes to 180 and then I want it to go left on the lower level of red which it will go to when it reaches green. However, when it is on red, it is programmed to heading 90, so I can't make it go left."

Do you have enough information to help us?

Thanks!

Daniel Wendel

unread,
Dec 12, 2014, 2:21:59 PM12/12/14
to starlo...@googlegroups.com
You can't do this with just 2 colors and no additional information. You can use 4 colors (easy solution), or keep the 2 colors, but then you have to also check the x coordinate and y coordinate, since you want the top and bottom red parts to cause the agent to turn different ways. So first check the patch color, then check the y coordinate, and depending on the y coordinate, make you decision of which heading to choose.

--Daniel

--
You received this message because you are subscribed to the Google Groups "StarLogo TNG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to starlogo-tng...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nram...@ellingtonps.net

unread,
Dec 15, 2014, 7:30:03 AM12/15/14
to starlo...@googlegroups.com
Thank you!
Reply all
Reply to author
Forward
0 new messages