Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » how to make collision
- 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.
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
- CreeperzAwMan
-
Scratcher
3 posts
how to make collision
Depends on the context. Are you doing a platformer, or are you doing a top down based game?Thanks! by the way this is a platformer
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
Last edited by CreeperzAwMan (Sept. 15, 2026 22:27:08)
- Discussion Forums
- » Help with Scripts
-
» how to make collision
