This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-04-12 16:46:20

ajackson45
New Scratcher
Registered: 2013-04-11
Posts: 4

How to make a solid wall

I'm making a game where the characters can jump from one platform to another and I can't figure out how to make the blocks (which are white) solid to jump on. Please help. If you can use scratch blocks

Offline

 

#2 2013-04-12 17:05:17

ajackson45
New Scratcher
Registered: 2013-04-11
Posts: 4

Re: How to make a solid wall

I'm really stuck please help!

Offline

 

#3 2013-04-12 22:42:48

Maltese_Falcon
Scratcher
Registered: 2013-03-25
Posts: 100+

Re: How to make a solid wall

Do you know what a sensor is? Check out jnb6355's sensor tutorial if you don't. Here's a way to use sensors. Let's say left sensor is red, right blue, up green, and down purple.

When [right arrow v] key pressed
if <not <color [#000056] touching color [#ffffff]>>
move [10] steps
end

When [left arrow v] key pressed
if <not <color [#e00707] touching color [#ffffff]>>
move [-10] steps
end

When [up arrow v] key pressed
if <not <color [#4ac925] touching color [#ffffff]>>
change y by [10]
wait [0.25] secs
repeat until <color [#5d2892] toucing color [#ffffff]>
change y by [-2]
end
end
I might have done something wrong there...but that should hopefully help.

Offline

 

#4 2013-04-12 22:51:34

Maltese_Falcon
Scratcher
Registered: 2013-03-25
Posts: 100+

Re: How to make a solid wall

Maltese_Falcon wrote:

Do you know what a sensor is? Check out jnb6355's sensor tutorial if you don't. Here's a way to use sensors. Let's say left sensor is red, right blue, up green, and down purple.

When [right arrow v] key pressed
if <not <color [#000056] touching color [#ffffff]>>
move [10] steps
end

When [left arrow v] key pressed
if <not <color [#e00707] touching color [#ffffff]>>
move [-10] steps
end

When [up arrow v] key pressed
if <<not <color [#4ac925] touching color [#ffffff]> and <color [#5d2892] touching color [#ffffff]
change y by [10]
wait [0.25] secs
repeat until <color [#5d2892] touching color [#ffffff]>
change y by [-2]
end
end
I might have done something wrong there...but that should hopefully help.

Fixed something with the up arrow.

Offline

 

#5 2013-04-12 23:05:41

Maltese_Falcon
Scratcher
Registered: 2013-03-25
Posts: 100+

Re: How to make a solid wall

Maltese_Falcon wrote:

Maltese_Falcon wrote:

Do you know what a sensor is? Check out jnb6355's sensor tutorial if you don't. Here's a way to use sensors. Let's say left sensor is red, right blue, up green, and down purple.

When [right arrow v] key pressed
if <not <color [#000056] touching color [#ffffff]>>
move [10] steps
end

When [left arrow v] key pressed
if <not <color [#e00707] touching color [#ffffff]>>
move [-10] steps
end

When [up arrow v] key pressed
if <<not <color [#4ac925] touching color [#ffffff]> and <color [#5d2892] touching color [#ffffff]>>
change y by [10]
wait [0.25] secs
repeat until <color [#5d2892] touching color [#ffffff]>
change y by [-2]
end
end
I might have done something wrong there...but that should hopefully help.

Fixed something with the up arrow.

Offline

 

#6 2013-04-13 10:54:32

Maltese_Falcon
Scratcher
Registered: 2013-03-25
Posts: 100+

Re: How to make a solid wall

Maltese_Falcon wrote:

Maltese_Falcon wrote:

Maltese_Falcon wrote:

Do you know what a sensor is? Check out jnb6355's sensor tutorial if you don't. Here's a way to use sensors. Let's say left sensor is red, right blue, up green, and down purple.

When [right arrow v] key pressed
if <not <color [#000056] touching color [#ffffff]>>
move [10] steps
end

When [left arrow v] key pressed
if <not <color [#e00707] touching color [#ffffff]>>
move [-10] steps
end

When [up arrow v] key pressed
if <<not <color [#4ac925] touching color [#ffffff]>> and <color [#5d2892] touching color [#ffffff]>>
change y by [10]
wait [0.25] secs
repeat until <color [#5d2892] touching color [#ffffff]>
change y by [-2]
end
end
I might have done something wrong there...but that should hopefully help.

Fixed something with the up arrow.

I hope that fixed it! come on!

Offline

 

#7 2013-04-13 11:04:12

NamorTheFirst
New Scratcher
Registered: 2013-04-10
Posts: 60

Re: How to make a solid wall

if
not touching colour white
change y by -3

Offline

 

#8 2013-04-13 11:59:26

SilverDomination
Scratcher
Registered: 2011-11-23
Posts: 500+

Re: How to make a solid wall

I think this thread should go in the Help w/ Scripts forum.


Sooner or Later. Or sooner. Not much, except for a lot. In a way. But it will come no matter what.

Offline

 

Board footer