Discuss Scratch

floppaisbad
Scratcher
15 posts

pen tool detection

i dont know how to sense when a pen tool thing senses when it touches another pen tool touching color does not work neither does if touching ____
BigNate469
Scratcher
1000+ posts

pen tool detection

Could you be more clear? What do you mean by “pen tool thing”?
MrKingofScratch
Scratcher
100+ posts

pen tool detection

Can you share the project? If your sprite is hidden or doesn't have a costume, the touching color block won't work. To fix this, make a costume with a small box to be used to detect colors (if you don't already have a costume that does the detection), then use
set [ v] effect to (100)
if you want the sprite to be hidden. Then,
<touching color [#8561e1] ?>
should work.
floppaisbad
Scratcher
15 posts

pen tool detection

BigNate469 wrote:

Could you be more clear? What do you mean by “pen tool thing”?

in my game there is a player character but i need him to be able to sense if he is touching the platform which is made out of pen
Mooaus2940
Scratcher
90 posts

pen tool detection

floppaisbad wrote:

BigNate469 wrote:

Could you be more clear? What do you mean by “pen tool thing”?

in my game there is a player character but i need him to be able to sense if he is touching the platform which is made out of pen
<touching color [#753692] ?>
does this not work?
malicondii
Scratcher
100+ posts

pen tool detection

floppaisbad wrote:

BigNate469 wrote:

Could you be more clear? What do you mean by “pen tool thing”?

in my game there is a player character but i need him to be able to sense if he is touching the platform which is made out of pen
If the player is a sprite, you can use the
<touching color [#ef7162] ?>
block as long as the player is showing.

If the player is pen it's a lot more difficult and would require to use math to detect collisions between the player and the platform. I have a couple projects with pen collisions on this account, and I can explain how they work if you need me to.
floppaisbad
Scratcher
15 posts

pen tool detection

that does not work
MrKingofScratch
Scratcher
100+ posts

pen tool detection

If the sprite doing the collision is hidden or doens't have a costume it won't work. Make a hitbox in the costumes and use
set [ghost v] effect to (100)
instead of the hide block
floppaisbad
Scratcher
15 posts

pen tool detection

MrKingofScratch wrote:

If the sprite doing the collision is hidden or doens't have a costume it won't work. Make a hitbox in the costumes and use
set [ghost v] effect to (100)
instead of the hide block

i am trying to make a game with 100% pen
-TUB-
Scratcher
100+ posts

pen tool detection

Loop through all of the platforms and see if the player is touching each of the individual platforms.
MrKingofScratch
Scratcher
100+ posts

pen tool detection

You can check if they're colliding with the lines using math- here's a cool example
https://scratch.mit.edu/projects/936028916/
Hammett23
Scratcher
1 post

pen tool detection

malicondii wrote:

floppaisbad wrote:

BigNate469 wrote:

Could you be more clear? What do you mean by “pen tool thing”?

in my game there is a player character but i need him to be able to sense if he is touching the platform which is made out of pen
If the player is a sprite, you can use the
<touching color [#ef7162] ?>
block as long as the player is showing.

If the player is pen it's a lot more difficult and would require to use math to detect collisions between the player and the platform. I have a couple projects with pen collisions on this account, and I can explain how they work if you need me to.

Hello, I would like you to explain it to me.

Powered by DjangoBB