forfreeolz.blogg.se

How to make something bounce when touching a color in scratch
How to make something bounce when touching a color in scratch




how to make something bounce when touching a color in scratch

Making a game end when a color is touched.If I said no support highlight this from “Hi” to “AWESOME”: Hi this is Think about your suggestion, was it going to benefit a majority of scratchers, did it have cons to a specific group, was it fully based on YOUR opinion, did you put some thought into the idea, simply forgot to read the sticky, has little pros, no purposeful reason, was there something wrong with scratch? If any of these apply to you think about your post, either revise it or close it.Preventing a sprite from passing through walls.Sensing whether a sprite has hit a dead-end in a maze.Stopping bullets if they hit walls of a specific color.Making a sprite do something if it touches a color, e.g., if the sprite touches blue (water), it reacts in a specific way.Moving a sprite until it touches a color.Scratchers considering using the Touching Color ()? block should be aware that it is slower than the Touching ()? block.

how to make something bounce when touching a color in scratch

This means that, when selecting color by clicking, care must be taken not to select a translucent edge pixel by mistake. Some graphics, even if they appear to have crisp edges in the Scratch Paint Editor, are subject to anti-aliasing when on the stage. Many Scratchers may never notice this phenomenon, but those wanting absolute precision in color detection should bear the Scratch limitation in mind. This means that the Touching Color ()? block will often return a false positive when sensing a color which is different from (but similar to) the specified one. Whilst the stage can display more than 16 million colors, Scratch only properly deals with a much smaller number of colors.

how to make something bounce when touching a color in scratch

This is because color sensing in Scratch has a built-in limitation, which reduces processing time. Significantly, the Touching Color ()? block does not always return false if its sprite is not touching the specified color. The Touching Color ()? block can produce unexpected/unwanted results.






How to make something bounce when touching a color in scratch