Walls in Star Logo TNG

136 views
Skip to first unread message

nram...@ellingtonps.net

unread,
Dec 3, 2014, 7:49:50 AM12/3/14
to starlo...@googlegroups.com
We were wondering if there is a way to prevent the players/agents in the game from going through the walls that have been set up in the terrain. In other words, can we get them to bounce off the wall instead of going through it?
 
Thanks!

Daniel Wendel

unread,
Dec 3, 2014, 11:59:08 AM12/3/14
to starlo...@googlegroups.com
Here's a maze game that uses color (look in the keyboard controls procedure) to prevent movement through walls. You could also use height instead (ph-ahead rather than pc-ahead), and there's also a block called "wall ahead" that detects if a wall or cliff is within 1 step ahead of you.

There's a bug in TNG 1.5 that makes the camera get really jittery if nothing is moving, so I added a "forward .0001" block into the forever block to fix that. It's detached in this version, but you can just put it back in if you need it.

--Daniel

On Wed, Dec 3, 2014 at 7:49 AM, <nram...@ellingtonps.net> wrote:
We were wondering if there is a way to prevent the players/agents in the game from going through the walls that have been set up in the terrain. In other words, can we get them to bounce off the wall instead of going through it?
 
Thanks!

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

maze game.sltng
Reply all
Reply to author
Forward
0 new messages