Discuss Scratch

ceratedemu96
Scratcher
50 posts

How do you make a solid wall for a maze?

I am making a maze and I can not figure out how to make a solid wall. Please help me. Thanks
turkey3
Scratcher
1000+ posts

How do you make a solid wall for a maze?

Assume the wall is black.
when gf clicked
go to x:(0) y:(0) //starting position
forever
if <key [right arrow v] pressed?>
change x by (2)
if <touching color [#000000]?>
change x by (-2)
end
end
if <key [left arrow v] pressed?>
change x by (-2
if <touching color [#000000]?>
change x by (2)
end
end
if <key [up arrow v] pressed?>
change y by (2)
if <touching color [#000000]?>
change y by (-2)
end
end
if <key [down arrow v] pressed?>
change y by (-2)
if <touching color [#000000]?>
change y by (2)
end
end
NBAFS50
Scratcher
1 post

How do you make a solid wall for a maze?

how do you do the lines of the maze?
gtoal
Scratcher
1000+ posts

How do you make a solid wall for a maze?

NBAFS50 wrote:

how do you do the lines of the maze?

I'm assuming you mean a 2D maze.

You can
1) draw the whole maze as a sprite/backdrop (or import an image drawn elsewhere)
2) draw the walls with the pen
3) draw the individual squares (or top and right walls only) and stamp them at each grid location
4) draw the individual walls, and stamp them (very similar to drawing with the pen)

You'll find lots of examples in the maze gallery: https://scratch.mit.edu/studios/403013/

Graham

PS If you mean a maze like a Pacman maze, it's usually only 1 & 3 that people do. I've seen 2 done once but it was awkward code.

Last edited by gtoal (April 7, 2015 21:40:22)

MahamZ
Scratcher
4 posts

How do you make a solid wall for a maze?

how do u make the maze start over? i mean i made a sprite that if u click it then the game starts over again but it didnt work. help!
Delphox915
Scratcher
100+ posts

How do you make a solid wall for a maze?

MahamZ wrote:

how do u make the maze start over? i mean i made a sprite that if u click it then the game starts over again but it didnt work. help!
when green flag clicked
forever

if <<mouse down?> and <<touching [mouse-pointer v] ?> >> then
go to x: (...) y: (...)
end

end
MahamZ
Scratcher
4 posts

How do you make a solid wall for a maze?

deck26 wrote:

MahamZ wrote:

how do u make the maze start over? i mean i made a sprite that if u click it then the game starts over again but it didnt work. help!
You should really start your own topic rather than necroposting on someone else's.

how do u make a discussion group
AidanGordon
New Scratcher
1 post

How do you make a solid wall for a maze?

turn cw () degrees
AR3Scratch
New Scratcher
1 post

How do you make a solid wall for a maze?

hi i am trying to make an game. its an maze game and i want the character to go back to the spawn when they touch the walls. its a bit like when you die but still… any help?
asivi
Scratcher
1000+ posts

How do you make a solid wall for a maze?

If touching maze goto start position.
PixelBear_London
Scratcher
21 posts

How do you make a solid wall for a maze?

This is the script you need AR3Scratch

when green flag clicked
forever
if <key [ Up arrow] pressed?> then
change y by (10)
end
if <key [ Down arrow] pressed?> then
change y by (-10)
end
if <key [Left arrow] pressed?> then
change x by (-10)
end
if <key [Right arrow ] pressed?> then
change x by (10)
end
if <touching [Maze] ?> then
go to x: (x) y: (y)
end
asivi
Scratcher
1000+ posts

How do you make a solid wall for a maze?

PixelBear_London wrote:

This is the script you need AR3Scratch

when green flag clicked
forever
if <key [ Up arrow] pressed?> then
change y by (10)
end
if <key [ Down arrow] pressed?> then
change y by (-10)
end
if <key [Left arrow] pressed?> then
change x by (-10)
end
if <key [Right arrow ] pressed?> then
change x by (10)
end
if <touching [Maze] ?> then
go to x: (x) y: (y)
end

What if their is a scrolling maze?
asivi
Scratcher
1000+ posts

How do you make a solid wall for a maze?

AR3Scratch wrote:

hi i am trying to make an game. its an maze game and i want the character to go back to the spawn when they touch the walls. its a bit like when you die but still… any help?

Please don't necropost and create your own topic instead; and don't forget to share your WIP project. Thanks.

WIP stands for work in progress

Last edited by asivi (Feb. 20, 2018 19:44:35)

tunetune257
Scratcher
1 post

How do you make a solid wall for a maze?

how to reset the sprite when touch the line
kittycatworior
Scratcher
2 posts

How do you make a solid wall for a maze?

how do you die
Violet-Wolf
Scratcher
12 posts

How do you make a solid wall for a maze?

This entire thread is just a mess
kittycatworior
Scratcher
2 posts

How do you make a solid wall for a maze?

thx
TheMaster5534
Scratcher
52 posts

How do you make a solid wall for a maze?

when green flag clicked
change [ v] by (0)


if you want a thing look idk okay
TheMaster5534
Scratcher
52 posts

How do you make a solid wall for a maze?

Um dont listen to my other comment
codeman1044
Scratcher
1000+ posts

How do you make a solid wall for a maze?

Please don't necropost.

Powered by DjangoBB