Activity 16 How to Create Edge Sprites


#1

Can someone please tell me how to create “edge” sprites to keep the character from bouncing out in Puzzle 16? I looked at the example solution, but can’t seem to find the right trunk from the animation library.


#2

Ms. Chun,

A way to do this is to have an if statement which checks the condition of x and y position, and if it’s true and over the edge +400 or -0 you could have the sprite rotate 180 degrees and continue on its path.

In the example they have created sprites that are the edges and then used the bounceOff block (might need to use text based programming for that character.bounceOff(edge) ). This way you are creating additional sprites to interact with.

Let me know if that helps!
Brad


#3

@jchun I think they just made their own sprite that is as tall or as wide as the screen. I can’t find the trunk and trunk flipped in the sprite library.