Discuss Scratch

CreeperzAwMan
Scratcher
3 posts

how to make collision

how do you make collision for ground, roof, and walls?
NMario84
Scratcher
1000+ posts

how to make collision

Depends on the context. Are you doing a platformer, or are you doing a top down based game?

in any case, the concept of collisions against walls is to push the character out of the walls until they are completely out of the walls entirely.

when green flag clicked
forever
change x by (5)
if <touching (walls v)> then
check wall
end
define check wall //[✔] Run without screen refresh.
repeat until <not <touching (walls v)>>
change x by (-1)
end
DUCK__Developer
Scratcher
21 posts

how to make collision

What is this for?
theContemplator
Scratcher
7 posts

how to make collision

Hi,
This tutorial may be of use to you.

CreeperzAwMan
Scratcher
3 posts

how to make collision

NMario84 wrote:

Depends on the context. Are you doing a platformer, or are you doing a top down based game?

in any case, the concept of collisions against walls is to push the character out of the walls until they are completely out of the walls entirely.

when green flag clicked
forever
change x by (5)
if <touching (walls v)> then
check wall
end
define check wall //[✔] Run without screen refresh.
repeat until <not <touching (walls v)>>
change x by (-1)
end
Thanks! by the way this is a platformer

Last edited by CreeperzAwMan (Sept. 15, 2026 22:27:08)

CreeperzAwMan
Scratcher
3 posts

how to make collision

theContemplator wrote:

Hi,
This tutorial may be of use to you.

the tutorial worked! thank you so much

Powered by DjangoBB