Walls
Sprite | Images |
---|---|
sprBrick | |
sprSmiley |
Object | Sprite | Properties |
---|---|---|
objSmiley | sprSmiley | Visible |
objBrick | sprBrick | Visible, Solid (shown below) |
room layout:
objSmiley | Key Down → Left event |
---|---|
objSmiley | Key Down → Right event |
---|---|
objSmiley | Key Down → Up event |
---|---|
objSmiley | Key Down → Down event |
---|---|
objSmiley | Key Down → Any event |
---|---|
objSmiley | Key Down → No Key event |
---|---|
objSmiley | Collision → objBrick event |
---|---|
extension activities:
- Explain what each of the events do. Note - the collision event triggers when the collision mask for each of the instances involved is touching. The solid property does not allow instances to pass through. The solid property wouldn't be advisable for things like coins, health pickups or finish lines (i.e. collisions that I have to be able to pass through).
- Can you add another frame of animation to the sprSmiley sprite so that its eyes flash?
- Can you speed up the movement of the smiley in the room? The default room_speed is (usually) 30 "steps per second" (this isn't frames per second, although while you are a GameMaker beginner, you can think of it in this way). So a speed of 3 is one tenth of the room speed.