Discuss Scratch

bunnymustard
Scratcher
500+ posts

how do i make a solid block that sprites cant pass through

i have wanted to make a maze for so long bit i cant think of how to make solid blocks
drmcw
Scratcher
1000+ posts

how do i make a solid block that sprites cant pass through

It's not a case of making solid blocks but telling the sprite where it can and can't go. The usual method is to have the walls a certain colour, say black, then using an if not touching black script allow the sprite to move.
goldfish33333333333
New Scratcher
1 post

how do i make a solid block that sprites cant pass through

I wont to now how to make a solide bloke so my sprite can jump on it
scubajerry
Scratcher
1000+ posts

how do i make a solid block that sprites cant pass through

There are a thousand of these around. But, I never made one before, so here is my first.
http://scratch.mit.edu/projects/12969047/

Last edited by scubajerry (Oct. 5, 2013 11:57:25)

ionvop
Scratcher
37 posts

how do i make a solid block that sprites cant pass through

try this one if you want to make an overview game, there are also other ways.

http://scratch.mit.edu/projects/17306995/

Last edited by ionvop (Jan. 31, 2014 04:31:24)

bawesome_animations
Scratcher
4 posts

how do i make a solid block that sprites cant pass through

never mind this

Last edited by bawesome_animations (Jan. 31, 2014 04:45:40)

colormaster323
New Scratcher
1 post

how do i make a solid block that sprites cant pass through

how do I make a solid block please
gummysharks
Scratcher
5 posts

how do i make a solid block that sprites cant pass through

how do you make it solid?
scratch575
Scratcher
29 posts

how do i make a solid block that sprites cant pass through

?????????
superendboy
Scratcher
7 posts

how do i make a solid block that sprites cant pass through

goldfish33333333333 wrote:

I wont to now how to make a solide bloke so my sprite can jump on it
I do too, i`m trying too make this game called void run.

Last edited by superendboy (Dec. 31, 2014 03:11:34)

InternetUser_005
Scratcher
100+ posts

how do i make a solid block that sprites cant pass through

You can not make a block sold in Scratch. You make your character sprite act like the block is solid by sensing when it is touching the “solid” block and then acting accordingly…. like not continuing to move.

See the list of helpful topics for scripting which is pinned at the top of the Help with scripts forum: http://scratch.mit.edu/discuss/topic/1046/

A bunch of the links on that page were broken for awhile but they are fixed now. Lots of super helpful stuff. It totally answers your questions… check it out!

HTH
IU5
superendboy
Scratcher
7 posts

how do i make a solid block that sprites cant pass through

drmcw wrote:

It's not a case of making solid blocks but telling the sprite where it can and can't go. The usual method is to have the walls a certain colour, say black, then using an if not touching black script allow the sprite to move.

plz use the blocks
ShadowScizor
Scratcher
100+ posts

how do i make a solid block that sprites cant pass through

Example:

when green flag clicked
forever

if <key [right arrow v] pressed?> then
change x by (10)
if <touching [wall v] ?> then

change x by (-10)
end

end

end

*wall is the name of a solid block
*under normal circumstances, when pressing right arrow, the sprite will move to the right
*however, when it hits the wall, it will not move
*this is the concept of a solid wall
GuiltyDisstress7
New Scratcher
1 post

how do i make a solid block that sprites cant pass through

do it ,more advanced
Total100Percent
New Scratcher
1 post

how do i make a solid block that sprites cant pass through

drmcw wrote:

It's not a case of making solid blocks but telling the sprite where it can and can't go. The usual method is to have the walls a certain colour, say black, then using an if not touching black script allow the sprite to move.
I did that but when i move my tank to touch the red it stays there. So it doesn't work really.
Hetvlot
Scratcher
20 posts

how do i make a solid block that sprites cant pass through

if you make the blocks where your character cant go trough black, then do:

when [ right arrow] key pressed
if <not <touching color [#ff0000] ?>> then

change x by (10)
end
Hetvlot
Scratcher
20 posts

how do i make a solid block that sprites cant pass through

i mean the block where you cant go trough is red
KittyFuzz
Scratcher
13 posts

how do i make a solid block that sprites cant pass through

when green flag clicked
forever

if <key [space] pressed?> then
set [height] to [up ]
change size by (20)
repeat until <<[(size)] = [100]> or <<touching [block] ?> >>

change size by (-2)
end
if <touching [block] ?> then
set [height] to [on block ]
end
if <not <touching [block] ?>> then
repeat until <(size) = [100 ]>

change size by (-2)
end
set [height] to [down]
end

end

end

this is for your character



Last edited by KittyFuzz (Feb. 15, 2015 15:13:08)

mrfire45MC
Scratcher
41 posts

how do i make a solid block that sprites cant pass through

have a script like this:
forever

if <not <touching [wall] ?>> then

move (speed) steps
end

end

then it should stop when it reaches the wall
superben100
Scratcher
1000+ posts

how do i make a solid block that sprites cant pass through

Hey! I have been looking for how to do a solid sprite as well. I figured it out. This is the 1 true awnser. To my knowlage, your solid sprite has to have no erased spots. (AKA the image has to fit your sprite perfectly, so like a square is the only shape you can use.) The scripts are:
when green flag clicked
forever
if <touching [ v] ?> then
go to x: () y: (0)

end


end

Ok, this should be in the moving sprite. The “Touching” block has to be set to your solid sprite. The “Goto X & Y” has to be set to the coords that you want your moving sprite to respawn when it hits the solid block. (Yes, sadly I only know how to do it with the sending you back at the beginning method.) Once you do that, you are done!

Last edited by superben100 (June 22, 2015 19:25:26)

Powered by DjangoBB