Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make a collision script for this?
- -Valtren-
-
1000+ posts
How to make a collision script for this?
edit: I simplified my script a bit so that you guys can hopefully understand it a bit better.
I've been making a game, and in it it uses this script for movement:
I've been making a game, and in it it uses this script for movement:
I've tried various different methods for making collisions but none of them work. Is there any way?
Last edited by -Valtren- (Feb. 22, 2024 01:13:06)
- evantparkes
-
98 posts
How to make a collision script for this?
Would touching blocks work?
Last edited by evantparkes (Feb. 21, 2024 16:24:56)
- malicondii
-
100+ posts
How to make a collision script for this?
as cube upload is blocked for me and i can't see the image, can you share the code in a project so i can see what it is and help better? I've been making a game, and in it it uses this script for movement:
(the variables X and Y act as normal X and Y position variables.)
I've tried various different methods for making collisions but none of them work. Is there any way?
- evantparkes
-
98 posts
How to make a collision script for this?
Then if you use D and hit a wall try w it won't work. I'm stumped. Try Youtube
- sashimiricedev
-
100+ posts
How to make a collision script for this?
Try this: https://scratch.mit.edu/projects/927729774
Or this: https://scratch.mit.edu/projects/940310732
Both of these are projects from my Forum Post Demos studio. Check it out!
Or this: https://scratch.mit.edu/projects/940310732
Both of these are projects from my Forum Post Demos studio. Check it out!
- -Valtren-
-
1000+ posts
How to make a collision script for this?
(#1)edited the script so it's a bit easier to understand.
edit: I simplified my script a bit so that you guys can hopefully understand it a bit better.
I've been making a game, and in it it uses this script for movement:I've tried various different methods for making collisions but none of them work. Is there any way?
- sashimiricedev
-
100+ posts
How to make a collision script for this?
This should help with your problem.
- yadayadayadagoodbye
-
1000+ posts
How to make a collision script for this?
I assume you're tryna make something topdown? If so, you could take a look at this
- NIKI-KOLCHAGOV
-
500+ posts
How to make a collision script for this?
The way i make collisions is when the character touches a wall it stops it from moving and waits until the player presses another key
Heres an example this should be in the player sprite
Heres an example this should be in the player sprite
And in the walls sprite
- Discussion Forums
- » Help with Scripts
-
» How to make a collision script for this?