Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » help with a maze
- solo_2002
-
3 posts
help with a maze
how can i get my sprite to complete a maze on its own using broadcast masages
- ErnieParke
-
1000+ posts
help with a maze
Getting the sprite to complete your maze can be tricky, depending on what you do. You can either have your sprite continue turning left whenever needed or possible, or you could use a pathfinding AI, which is complicated. From those to options, I'd recommend having the sprite turn left whenever it can move left, or whenever it can't move forwards, since it's much simpler then the other method.
Once you get the code for that, you should be good. ;)
By the way, you'll probably need a turn left and a move forwards broadcast for this.
With regards,
ErnieParke
Once you get the code for that, you should be good. ;)
By the way, you'll probably need a turn left and a move forwards broadcast for this.
With regards,
ErnieParke
- turkey3
-
1000+ posts
help with a maze
Using broadcasts might be tough, but here's another way, say the sprite comes to an intersection, and the maze is black. You can have it wait until it touches black, and then point either left, right, up, or down, and move from there.
- solo_2002
-
3 posts
help with a maze
i was trying to get it to broadcast but it seem to get so far and go all mad and go round and round
- ErnieParke
-
1000+ posts
help with a maze
Could I maybe see your scripts? I might be able to fix things from there. i was trying to get it to broadcast but it seem to get so far and go all mad and go round and round
With regards,
ErnieParke
- ErnieParke
-
1000+ posts
help with a maze
You could type it, like this: how do i do that
when gf clicked
forever
say for (2) secs
That, or you could share your project, or you could take a lot of pictures.
With regards,
ErnieParke
- dawid123791
-
1 post
help with a maze
New game coming out soon: looking for food. Great game, great fun. Look out for it
- Discussion Forums
- » Help with Scripts
-
» help with a maze