Step 6: Showing a Win Screen

Goal:


Our player can now win, but the victory screen will look a little weird if they do. Let’s fix this!

After this is done the game will be complete! Feel free to play with it and see how well you can do!

Steps:

  1. Stay on the “Player” sprite
  2. From Events, place a new when I receive block
  3. Set the message for the when I receive block to be “RaceOver!”
  4. From Looks, place a hide block
  5. From Control, place an if then block
  6. From Operators, place a “=” block inside the if statement
  7. From Variables, place a round “Winner” block on the left side of the “=” block
  8. Type in a 1 on the right side of the “=” block
  9. From Motion, place a go to x/y block inside the if then block
  10. Inside the go to x/y block, set X to -9 and set Y to -14
  11. From Looks, place a set size to block
  12. Inside the set size to block, type in 100
  13. From Looks, place a show block

Code: