GAME MAKER CREATING OBJECTS 1. You will be creating objects for each of your sprite. Creating objects will allow you to make actions and events for your sprites. Let’s say you want your character to go up when you press the up key arrow, creating objects for your sprites will permit you to do this. 2. You will first make an object for your character. Right-click on the Object folder and create an Object: 3. In the Object Properties window, rename the object as “obj_character”. Set the Sprite to your sprite_character. Check on Solid, this is very important as it allows the character to interact with other solid objects in the scene. Click OK. 4. Create objects for all of your other sprites as you did for your character (repeat steps 2 to 3). You should now have the objects for all of your sprites in the objects folder: CHARACTER OBJECT PROPERTIES 1. Double click on the obj_character to open up the Object Properties for your character. Click Add Event>Collision>obj_wall. Drag the Bounce icon onto the Actions box. Keep the default settings and hit OK. This will allow the character to bounce off the wall when he touches it. If you don’t add apply this action, your character will just go through the wall and we don’t want that to happen. 2. Click Add Event>Collision>obj_coin. When your character collides onto the coin, you want your character to score every time. To do this, Drag Execute Code onto the Actions box. For the code type in: score+=10 3. Click Add Event>Collision>enemy_obj. Drag the Change Instance onto the Action box and set change into obj_destroyed character. By adding this, your character will turn into broken pieces when it collides with the enemy. 4. When the game begins, we want to see the starting score. To do this, Click Add Event>Other>Game Start. Drag Execute Code onto the Action box and type in the code: score = 0 5. Click Add Event>Key Press>Left. Drag Moved Fixed onto the Action box. For the properties, set Applies to Self, directions to left arrow, and speed to 2. Click OK. What this will do is when you press the left arrow key on your keyboard, the character will move to the left. 6. Click Add Event>Key Press>Right. Drag Moved Fixed onto the Action box. For the properties, set Applies to Self, directions to right arrow, and speed to 2. Click OK. 7. Click Add Event>Key Press>Up. Drag Moved Fixed onto the Action box. For the properties, set Applies to Self, directions to up arrow, and speed to 2. Click OK. 8. Click Add Event>Key Press>Down. Drag Moved Fixed onto the Action box. For the properties, set Applies to Self, directions to down arrow, and speed to 2. Click OK. 9. Click Add Event>Key Release>Left. Drag Moved Fixed on the Action box. For the properties, set Applies to Self, and directions to stop. Click OK. What this will do is when you release the left arrow key, your character will stop moving. 10. Click Add Event>Key Release>Right. Drag Moved Fixed on the Action box. For the properties, set Applies to Self, and directions to stop. Click OK. 11. Click Add Event>Key Release>Up. Drag Moved Fixed on the Action box. For the properties, set Applies to Self, and directions to stop. Click OK. 12. Click Add Event>Key Release>Down. Drag Moved Fixed on the Action box. For the properties, set Applies to Self, and directions to stop. Click OK. 13. You should now have the following events in order for your character: COIN OBJECT PROPERTIES 1. Double click obj_coin. Click Add Event>Collision>obj_character. Drag Destroy Instance to the Actions box. Set to Applies to Self. What this will do is when your character picks up the coin, the coin will disappear. DESTROYED CHARACTER OBJECT PROPERTIES 1. Double click obj_destroyedcharacter. Click Add Event>Step>Step. Drag Moved Fixed onto the Actions box and set direction to down arrow and speed of 8. Click OK. What this will do is when your character is destroyed, the destroyed pieces will fall down. ENEMY OBJECT PROPERTIES 1. Double click obj_enemy. Click Add Event>Create. Drag Moved Fixed onto the Actions box and set directions to left, right, up, and down arrows with a speed of 5. Click OK. What this will do is when the game begins, the enemy will start moving in different directions and you must avoid him or you will be destroyed. 2. Click Add Event>Collision>obj_wall. Drag Bounce to the Actions box and keep the default settings. What this will do is when the enemy touches the wall, he would stay inside the scene and not go through the wall. 3. Add another action for your obj_wall. Drag Wrap Screen to the Actions box and set direction in both directions. 4. You should have the following objects in the objects folder:
© Copyright 2026 Paperzz