Name: ___________________________________________ 45 Lesson 3 Click Ball Copyright Goodheart-Willcox Co., Inc. May not be reproduced or posted to a publicly accessible website. 68. Click the Choose comparison method: drop-down arrow, and click Equal in the drop- down list. 69. Click in the Enter expression to compare with: text box, and enter 10. 70. Click the OK button to complete the condition statement. 71. Right-click in the cell on line 2 below the Storyboard Controls icon, and click Next frame in the shortcut menu. Line 2 is now programmed for this pseudocode: IF the score for player 1 equals 10, THEN go to the next frame. User Interface The user interface is how the player will interact with this game. For this game, the player will need to click the ball to add one point to the score. This will create the user interface, and you will have all three elements of a video game. 72. Add a new condition. In the New Condition dialog box, right-click on the icon for The mouse pointer and keyboard, and click The mouse User clicks on an object in the shortcut menu. The User clicks on an object dialog box is displayed, as shown in Figure 3-9. 73. Click the Left button radio button to set which mouse button the user must click. Select the comparison method Enter a value Select which mouse button to click Select the type of click Goodheart-Willcox Publisher Figure 3-8. The expression editor is used to set up equations and formulas. Goodheart-Willcox Publisher Figure 3-9. When testing the condition of the user clicking an object, you must select which button is pressed and whether it is a single-click or double-click.
Previous Page Next Page