The following files have been attached to this tutorial:
This tutorial hasn't been translated.
This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.
Select the Right image point and position it at the right side of the girder. Position 383, 16.
Now add our last image, the hammer. Set its origin to 32, -20, and close the editor.
Finally, on the Intro layout click the girder, hold down the Ctrl-key and drag and drop to make an instance. Do the same for the hammer.
Position one girder at -106, 277 and the other at 537, 277.
Position one hammer at 73, 277 and the other at 359, 277.
Save your project and you should end up with this.
Adding behaviors to objects"]
Adding behaviors to objects
Behaviors add functionality to our objects. Some examples of behaviors:
To add a behavior to an object, select the object to apply the behavior to and in the Properties panel click add Behaviors.
Add the Bullet behavior to the girder, clouds, building and ground objects. Set the Speed to 200, Set the angle to No and the Initial state to Disabled for all of these objects.
Add the Sine behavior to the hammer object. Set Movement to Angle, Period to 3 and Magnitude to 30. This will make the hammer swing from its current angle.
Also, add a Sine behavior to the title object. Use the settings as shown below.
Save your project and run the Intro layout. You should see the title moving up and down and the hammers swinging back and forth.
Adding sound files"]
Adding sound files
From the Projects panel, right click on the Sounds folder and select Import Sounds.
Navigate to the Sounds folder, select all the sound files and click Open.
Click Import and then OK to close the window. You will now see your imported sound files in the Sounds folder.
Intro Event sheet"]
Intro Event sheet
Click on the Intro Event sheet. Here we are going to add conditions and actions that will affect our objects on the Intro layout. Remember that these two are linked to each other.
The first thing you might want to ask yourself before adding any conditions and actions to the event sheet is: "What do I want to happen when the event sheet starts and in what order do I want them to be executed?"
The first thing we want to happen when the Intro layout starts, is to make all layers visible and preload all the sounds.
Add an event by double clicking anywhere in the Intro Event sheet or clicking on Add Event. When the window opens, click the System object and search for On start of layout and select it. When the Intro layout starts we want a few things to happen before any other events get executed. Set all layers to visible and preload all sounds.
Click Add action or press A on the keyboard to add an action. When the window appears double click on the System object and search for Set layer visible and double click it.
dazedangels We us this counter for the Medal screen. If your score is 10 and you die then on the Medal screen. Start at 0 and increase by 1 every 0.07 seconds until 10 is reached.
Check this vid at 0:36.
Hope this helps.
Why are we creating an event in "Game Over" to add 1 to ScoreCounter every 0.07 if ScoreCounter isn't equal to Score? What is ScoreCounter doing, if the game is over?
"-System: Every X seconds, where seconds is 0.07"