Discuss Scratch

Its_A-Me
Scratcher
5 posts

Pen Collision

How do I do pen collision like in pen platformers?
when green flag clicked
pen down
I know that part

Last edited by Its_A-Me (Sept. 22, 2021 15:40:54)

LG125
Scratcher
500+ posts

Pen Collision

I have no experience with pen but this would take calculations to drawing the level and player and calculating collisions, and in generals making a pen platformer is hard.



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|

Follow:@Twin138956Scratch , @programmer3456
Alt: @Sars_Alt
Icon by @ipzy

-TUB-
Scratcher
100+ posts

Pen Collision

Rect Collision:
define is touching? (x) (y) (w) (h)
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
((x, y) is the center of the rectangle)

- T U B -
The United Bathtubs


Select part of my signature and use shift+down arrow to see the rest





anthonyfish
Scratcher
18 posts

Pen Collision

Its_A-Me wrote:

How do I do pen collision like in pen platformers?
when green flag clicked
pen down
I know that part
You can use this block:
<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

Its_A-Me wrote:

How do I do pen collision like in pen platformers?
when green flag clicked
pen down
I know that part
I have made one before (on my main account) and let me tell you, it takes some work. Here is the one I made: https://scratch.mit.edu/projects/496500998/

Last edited by DaCatBlock (Sept. 28, 2021 11:49:25)



“The Cat Block… It's Alive.”

Powered by DjangoBB