Discuss Scratch

-Dustrix-
Scratcher
10 posts

Collision

Im somewhat new to scratch, but I'm trying to see if there is a way to detect how many times a sprite has hit another sprite, and then make it do another action when it hits another sprite for the third time, In general, I'm trying to make a sprite stop moving after it hits another sprite three times. sorry if this is hard to follow
TutoeTurtle
Scratcher
92 posts

Collision

Make a variable
collisions
Then, make it so when it collides it changes “collisions” by 1.
foreveriftouchingsprite?thenchangecollisionsby1waituntilnottouchingsprite?
Then, add an “if then” block.
ifcollisions=3thenwhateveryouwantend
EDawg2011
Scratcher
1000+ posts

Collision

Can you please share the project and give us the link so that we can help better?

idk if this will work.

settouchto0foreveriftouchingSprite 2?thenwaituntilnottouchingSprite 2?changetouchby1

whenclickedwaituntiltouch>2stopother scripts in sprite

Powered by DjangoBB