Pages: 1
Topic closed
Is there a way to do this BESIDES clicking on the "only face left-right" button at the top?
My class is making games, and I want the games to be as self-contained as possible, ie: the user should not have to know to click on that button to fix the problem.
Thanks in advance!
Bob
Offline
No. What's wrong with clicking the button?
Offline
Thanks for the reply. The problem with clicking the buttons is that it asks the player, who didn't program the game, to do something the programmer should have done for him. Not all players are familiar with those buttons.
I actually came up with a fix.
1. Take the sprite and make another costume by flipping the original.
2. Name the costumes "left" and "right".
3. Put 2 different color vertical lines on the two vertical edges.
4. Have a block that tests if the sprite is touching one of those colors.
5. If it touches the one on the right, switch costume to the left-facing one.
6. If it touches the one on the left, switch costume to the right-facing one.
7. Keep the sprite moving and bouncing off the edge.
It works!
Offline
birv2 wrote:
Thanks for the reply. The problem with clicking the buttons is that it asks the player, who didn't program the game, to do something the programmer should have done for him. Not all players are familiar with those buttons.
I actually came up with a fix.
1. Take the sprite and make another costume by flipping the original.
2. Name the costumes "left" and "right".
3. Put 2 different color vertical lines on the two vertical edges.
4. Have a block that tests if the sprite is touching one of those colors.
5. If it touches the one on the right, switch costume to the left-facing one.
6. If it touches the one on the left, switch costume to the right-facing one.
7. Keep the sprite moving and bouncing off the edge.
It works!
Have the programmer click the button.
Offline
How about just telling it to flip again?
[blocks]<turn cw( 180 )degrees> [/blocks]
Offline
Harakou wrote:
If you click the button and save the project, it'll maintain that setting when you open it later. That's what it's there for.
I didn't know that. Thanks!
I did get some good practice in problem solving though.
Offline
Topic closed
Pages: 1