Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do i make collisions?
- WinterCat18
-
Scratcher
100+ posts
How do i make collisions?
wdym collisions
Don't you understand?Last edited by WinterCat18 (July 27, 2025 02:22:34)
- Bitebite12
-
Scratcher
1000+ posts
How do i make collisions?
I know what collisons are, but which ones? Sprite on sprite, sprite on clone, clone on clone, sprite on text, clone on text, text on text, what hitbox you want (some of these don't even need one!), basically, be more specific.wdym collisionsDon't you understand?
- WinterCat18
-
Scratcher
100+ posts
How do i make collisions?
Player on groundI know what collisons are, but which ones? Sprite on sprite, sprite on clone, clone on clone, sprite on text, clone on text, text on text, what hitbox you want (some of these don't even need one!), basically, be more specific.wdym collisionsDon't you understand?
- WinterCat18
-
Scratcher
100+ posts
How do i make collisions?
Last edited by WinterCat18 (July 27, 2025 05:08:00)
- KevinOVO
-
New Scratcher
92 posts
How do i make collisions?
Is this what you want?
when green flag clicked ::cat
set [X Speed v] to [0] // Initialize
set [Y Speed v] to [0]
go to x: (0) y: (0)
forever
if <touching (Ground v) ?> then
set [Y Speed v] to [0] // Simple collision
else
change [Y Speed v] by (-0.5) // Gravity
end
change x by (X Speed) // Movement
change y by (Y Speed)
end
- WinterCat18
-
Scratcher
100+ posts
How do i make collisions?
Is this what you want?Yes.when green flag clicked ::cat
set [X Speed v] to [0] // Initialize
set [Y Speed v] to [0]
go to x: (0) y: (0)
forever
if <touching (Ground v) ?> then
set [Y Speed v] to [0] // Simple collision
else
change [Y Speed v] by (-0.5) // Gravity
end
change x by (X Speed) // Movement
change y by (Y Speed)
end
- Discussion Forums
- » Help with Scripts
-
» How do i make collisions?