Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Pen Collision
- Its_A-Me
- Scratcher
5 posts
Pen Collision
How do I do pen collision like in pen platformers?
when green flag clickedI know that part
pen down
Last edited by Its_A-Me (Sept. 22, 2021 15:40:54)
- Sars12987
- Scratcher
500+ posts
Pen Collision
I am not exactly sure how that would work perhaps you could go through few of his tutorials to understand more: https://www.youtube.com/channel/UCnQwBjox27DTMHk32MmIL9Q
{Forum Posts Made:{500+}
{Proposed:500+ studios}
13 |Boy|India|Bookworm|PPTBF Curator|
- -TUB-
- Scratcher
100+ posts
Pen Collision
Rect Collision:
define is touching? (x) (y) (w) (h)((x, y) is the center of the rectangle)
set [touching? v] to [false]
if <((2) * ([abs v]((player x) - (x)))) < ((player width) + (w))> then
if <((2) * ([abs v]((player y) - (y)))) < ((player height) + (h))> then
set [touching? v] to [true]
end
end
- anthonyfish
- Scratcher
18 posts
Pen Collision
You can use this block: How do I do pen collision like in pen platformers?when green flag clickedI know that part
pen down
<color [#23e8c9] is touching [#90c16f] ?>
Please check out my profile {and maybe hit the follow button} and my new game: BOT BASHER!
Thanks so much!
- DaCatBlock
- Scratcher
100+ posts
Pen Collision
I have made one before (on my main account) and let me tell you, it takes some work. Here is the one I made: How do I do pen collision like in pen platformers?https://scratch.mit.edu/projects/496500998/when green flag clickedI know that part
pen down
Last edited by DaCatBlock (Sept. 28, 2021 11:49:25)
“The Cat Block… It's Alive.”
- Discussion Forums
- » Help with Scripts
- » Pen Collision