Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make a Glide Collision
- Tesla0511
-
22 posts
How to make a Glide Collision
Can you tell me how to make a Glide Collision
I'm Working on a game called “Nextbot Creator” and I'm I'm having some minor issues
The one who helped me deserve a follow
I'm Working on a game called “Nextbot Creator” and I'm I'm having some minor issues
The one who helped me deserve a follow
- deck26
-
1000+ posts
How to make a Glide Collision
Generally it is better to use a loop for movement if you want to detect collisions. Otherwise the collision has to be detected by a separate script since while the glide block is running the script that contains it will not be doing anything else.
- Tesla0511
-
22 posts
How to make a Glide Collision
That was a bit not helpful, but thanks, you deserve a follow 

- skeletonsteveplays
-
100+ posts
How to make a Glide Collision
So, what do you mean by a glide collision?
Last edited by skeletonsteveplays (Aug. 18, 2022 23:54:50)
- Tesla0511
-
22 posts
How to make a Glide Collision
ok
collision is something you bounce on another sprite
collision is something you bounce on another sprite
Last edited by Tesla0511 (Aug. 19, 2022 01:01:47)
- RT_Borg
-
1000+ posts
How to make a Glide Collision
Hi Tesla0511,
I think we're having trouble answering because of the term “Glide Collision”. That sounds like you're using the “glide” block:
as deck26 pointed out, once a script calls the glide block, it performs the glide over however many secs. If your sprite were to collide with some other object while it is gliding, another script could detect “touching”, but it's difficult to do much about it. (Your only option to stop in the middle of a glide is
That might be acceptable if you actually want to stop when sprites touch (and have no other scripts in the sprite that need to keep running.) But you said
If you need to bounce, you probably need to adjust your movement to use something other than glide (move blocks or change x by, change y by).
If you share the project and post a link, you may get suggestions on how to adjust your movement code to work with collisions.
– RT_Borg
I think we're having trouble answering because of the term “Glide Collision”. That sounds like you're using the “glide” block:
as deck26 pointed out, once a script calls the glide block, it performs the glide over however many secs. If your sprite were to collide with some other object while it is gliding, another script could detect “touching”, but it's difficult to do much about it. (Your only option to stop in the middle of a glide is
That might be acceptable if you actually want to stop when sprites touch (and have no other scripts in the sprite that need to keep running.) But you said
collision is something you bounce on another sprite
If you need to bounce, you probably need to adjust your movement to use something other than glide (move blocks or change x by, change y by).
If you share the project and post a link, you may get suggestions on how to adjust your movement code to work with collisions.
– RT_Borg
- mineguy9
-
30 posts
How to make a Glide Collision
If you want to move something you can do
Last edited by mineguy9 (Aug. 19, 2022 02:25:11)
- Tesla0511
-
22 posts
How to make a Glide Collision
sorry i cant use it
i meant using glide block but its ok
that was pretty helpful
i meant using glide block but its ok
that was pretty helpful
- mineguy9
-
30 posts
How to make a Glide Collision
The problem with glide block is there is not a good way to stop it, like RT_Borg said
So using the “repeat until touching” script is probably the closest to being able to have something “glide” and still being able to stop it.
If your sprite were to collide with some other object while it is gliding, another script could detect “touching”, but it's difficult to do much about it. (Your only option to stop in the middle of a glide is
So using the “repeat until touching” script is probably the closest to being able to have something “glide” and still being able to stop it.
Last edited by mineguy9 (Aug. 19, 2022 03:37:08)
- snowberis
-
81 posts
How to make a Glide Collision
The problem with glide block is there is not a good way to stop it, like RT_Borg saidIf your sprite were to collide with some other object while it is gliding, another script could detect “touching”, but it's difficult to do much about it. (Your only option to stop in the middle of a glide is
So using the “repeat until touching” script is probably the closest to being able to have something “glide” and still being able to stop it.
I agree, I believe the glide block lags when it glides so collision scripts could possibly stop working.
However, if you do insist on using the glide method,
Note: with this method, you won’t be able to get to the edge of a wall, but it works.
Last edited by snowberis (Aug. 19, 2022 13:09:24)
- Discussion Forums
- » Help with Scripts
-
» How to make a Glide Collision