Discuss Scratch

hfjhksjhgkjfghj
Scratcher
20 posts

I need help with collision.

can you help me? i am looking on how to have collision with an object

i have searched the web, but, i found nothing helpful.

Last edited by hfjhksjhgkjfghj (Oct. 1, 2020 17:28:36)

mstone326
Scratcher
1000+ posts

I need help with collision.

You can use the touching block.

<touching [ v] ?>
hfjhksjhgkjfghj
Scratcher
20 posts

I need help with collision.

mstone326 wrote:

You can use the touching block.

<touching [ v] ?>

i know, but, i need help for the script on how to make a sprite stop when touching another sprite.
mstone326
Scratcher
1000+ posts

I need help with collision.

Share your project. Otherwise we can't tell how you want something to stop.

Something like this would work though.

forever

if <touching [thing v] ?> then
move (0) steps


else
move (10) steps
end
end
hfjhksjhgkjfghj
Scratcher
20 posts

I need help with collision.

mstone326 wrote:

Share your project. Otherwise we can't tell how you want something to stop.

Something like this would work though.

forever

if <touching [thing v] ?> then
move (0) steps


else
move (10) steps
end
end


https://scratch.mit.edu/projects/431294357/ i shared it
mstone326
Scratcher
1000+ posts

I need help with collision.

What is supposed to collide. I hit the edges and screens change, then the ask block pops up. What should be colliding with what?
hfjhksjhgkjfghj
Scratcher
20 posts

I need help with collision.

do yo

mstone326 wrote:

What is supposed to collide. I hit the edges and screens change, then the ask block pops up. What should be colliding with what?

do you see the huge black block at one of the edges? i want to make it collide with that.
mstone326
Scratcher
1000+ posts

I need help with collision.

Check this remix, i left a comment tag where I added a block. https://scratch.mit.edu/projects/431593811/

Powered by DjangoBB