Name: __________________________________________
Copyright
by
The
Goodheart-Willcox
Co.,
Inc.
Lesson 3 Click Ball 31
32. Click the Show Information button. The Information about: dialog box is displayed.
This dialog box shows the scripting for the object. When changes are made in the Object
Properties dialog box, Game Maker automatically builds the scripting so you do not have
to. Close the Information about: dialog box.
33. Leave all other options in the Object Properties dialog box at the default settings, and
click the OK button to fi nish creating the object.
34. The OBJ_Ball object is added to the resource tree in the Objects branch (folder).
35. Using similar steps, create a wall object named OBJ_Wall using the SPR_Wall sprite.
Check both the Visible and Solid check boxes. Since this object will not move, it is okay
to make the object solid.
36. Save your work.
Adding Objects to the Room
Now, you have created two sprites and two objects. You have also assigned the sprites to
the objects. However, you have not yet placed the objects in a room (scene). Remember, earlier
you created a room named room0. You will use this room to build the game.
37. In the resource tree, expand the Rooms branch and double-click room0 to open the room
for editing.
38. Click the Windows maximize button in the top-right corner of the Room Properties
window to maximize the room display.
39. Click the Objects tab in the Room Properties dialog box (which is now maximized). At
the bottom of the tab are some helpful directions, as shown in Figure 3-6.
40. Click the selection button to display a list of objects and choose the OBJ_Ball object.
41. Left-click anywhere in the room to place an instance of the ball object. Notice that the
object snaps to a position that is aligned to the top-left corner of the grid.
42. Left-click anywhere in the room to place another instance of the ball.
43. Right-click on each ball object to delete both of them.
44. Hold down the [Alt] key on the keyboard and left-click anywhere in the room. An instance
of the object is placed in the room, but it does not snap to the grid lines.
45. Hold down the [Ctrl] key and left-click the ball object you just added. Drag the ball so it is
located in the center of the room and then release the mouse button. Notice as you drag
the object, it snaps to the grid. If you hold down the [Ctrl] and [Alt] keys, you can drag the
object without it snapping to the grid.
Click to select
a different object
Coordinates of cursor
Object to
be inserted
Figure 3-6
Previous Page Next Page