Discuss Scratch

AnOldManTwo
Scratcher
43 posts

On one level Frankie won't go through a platform, on the other he will.

https://scratch.mit.edu/projects/1112092581/

2 ground sprites. In costume 2 he hits the ceiling and won't go through like he should but in costume 3 he goes through it!

'Sup wit dat?

Last edited by AnOldManTwo (Dec. 22, 2024 21:39:26)

many_pots
Scratcher
1 post

On one level Frankie won't go through a platform, on the other he will.

The sprite was not registering as touching the color for some reason, so I had to switch the dark brown lines on costume 3 to black for it to work. I adapted the `Don't hit dark brown when jumping` function to reflect this change:

defineDon'thitdarkbrownwhenjumpingifYvelocity>0thenrepeatuntilnottouchingcolorortouchingcolorsetY velocityto0changeyby-1

I hope this helps
AnOldManTwo
Scratcher
43 posts

On one level Frankie won't go through a platform, on the other he will.

Interesting. I was able to use the dark brown color, not black and it works. Might that be the result of using the “not” as well as the “or” operators?

Who says, you can't teach an old dog new tricks?

John Fitzherbert, an English gentleman, in his 1534 book The Boke of Husbandry. That's who.

Thanks a lot, man!
AnOldManTwo
Scratcher
43 posts

On one level Frankie won't go through a platform, on the other he will.

Oops. Spoke too soon.

When he hits the dark brown on the left, he automatically jump on top of the block. Same with the platform.

Powered by DjangoBB