Like when a character moves, it hits a wall, and it can't move on. I can't do that. When my character moves, it goes right past the wall! How do I make a "wall?"
Offline
bump.
Offline
bump
Offline
The character should have this script:
[blocks]
<when green flag clicked>
<forever if><key[ right arrow ]pressed?>
<move( -3 )steps>
[/blocks]
(Do this for every direction)
Offline
Ok, here is my movement script: <when I receive[ Now
<forever if><key[ left arrow ]pressed?>
<point in direction( -90 <move( 4 )steps>
Offline
The really easy way to do it would be to make it turn 90 degrees when touching the colour of your wall. Would that work for you, or do you need a different solution?
Offline
GurkinC wrote:
The really easy way to do it would be to make it turn 90 degrees when touching the colour of your wall. Would that work for you, or do you need a different solution?
Thanks! I've got it all solved.
Offline
How about using the [blocks]<touching[ [/blocks] block with "edge" in the drop-down menu? I struggled with this recently when wanting a sprite to broadcast an event (and change the background) when it hit the wall. You can see it if you choose the "yes" option in this project. Good luck!
Last edited by alfiaw (2011-03-26 18:36:08)
Offline