Edge of terrain

13 views
Skip to first unread message

nram...@ellingtonps.net

unread,
Dec 8, 2014, 7:54:38 AM12/8/14
to starlo...@googlegroups.com
I have a student who would like to know how you can program a player/agent to "die" when they hit the edge of the terrain, instead of bouncing back.

Daniel Wendel

unread,
Dec 8, 2014, 10:58:00 AM12/8/14
to starlo...@googlegroups.com
The terrain goes from -50 to 50 in all directions. So you can program a check to see if the agent is within a certain "end zone" (say, if x > 48), and have it die if so. Remember that if the agent is going forward 10, though, the end zone needs to be at least 5 steps wide, because otherwise it might take a huge step, bounce off the edge, and come back, all without actually landing in the end zone.

On Mon, Dec 8, 2014 at 7:54 AM, <nram...@ellingtonps.net> wrote:
I have a student who would like to know how you can program a player/agent to "die" when they hit the edge of the terrain, instead of bouncing back.

--
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.

Reply all
Reply to author
Forward
0 new messages