Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » need help with some colisions
- BLSturton2
- Scratcher
13 posts
need help with some colisions
so I am making a megaman like platfromer. For one of the areas, there is a roof that i want to add collision. Currently I have it set up like this-
when flag clicked-> forever if touching color (insert color here) -> then change Y by -20
the problem is that when you hit the roof, the character goes into the floor, if anyone can help, that will be great
when flag clicked-> forever if touching color (insert color here) -> then change Y by -20
the problem is that when you hit the roof, the character goes into the floor, if anyone can help, that will be great
- imfh
- Scratcher
1000+ posts
need help with some colisions
I would recommend checking out the Platformer Tutorial by @griffpatch_tutor. It will show you how to make more realistic gravity and better collisions. If you need more help after that, it might be a good idea to share the project and link here so we can see exactly what is wrong.
Scratch to Pygame converter: https://scratch.mit.edu/discuss/topic/600562/
- beard-cat
- Scratcher
47 posts
need help with some colisions
Share the project link here, but something that might help would be to test if the collision is right.
when green flag clicked
forever
if <touching color [#efd41b] ?> then
say [Collided] for (2) secs
end
end
when green flag clickedCheck out this project: https://scratch.mit.edu/projects/251963381/
forever
Sub to beard-cat
end
- Discussion Forums
- » Help with Scripts
- » need help with some colisions