Swing Copters...From The Ground Up

3

Index

Attached Files

The following files have been attached to this tutorial:

.zip

swing-copters-assets.zip

Download now 195.54 KB
.capx

swing-copters.capx

Download now 328.31 KB

Stats

16,633 visits, 37,898 views

Tools

Translations

This tutorial hasn't been translated.

License

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.

Published on 11 Aug, 2017. Last updated 19 Feb, 2019

Finally, we are now going to round this up by adding behaviors to the objects we've just added.

obj_Player (Pin / Rotate)

obj_GameOver (Bullet / Sine)

obj_GetReady (Bullet)

obj_Instructions (Bullet)

obj_Propeller (Bullet)

obj_RightPropeller and obj_LeftPropeller (Bullet / Rotate)

obj_ScoreBoard (Bullet)

When done, the Game layout will look like this.

Save the project.

[page="

The Game Event sheet"]

The Game Event sheet

The Game Event sheet will contain events that will handle the main game play. We will be using Global and Local variables, Loops, Functions, Local Storage for the high score, and we will be grouping events so that all is organized.

First, click on the Game Event sheet tab and add three Global variables by right clicking on the sheet. Select Add global variable. Name this variable Hiscore. Add two more and name them Score and ScoreCounter.

Group: Startup

Right click again and select Add group. Name the group Startup. Leave Active on start checked. Select the Startup group and press E on the keyboard to add the event System: On start of layout. Click and hold on the left side of this event, preferably on the green arrow, and drag to the right. This event is now a sub-event of the Startup group.

Right click on the green arrow and select Add local variable. Name the variable CloudColor. This variable can only be accessed in its current scope (anywhere within the main branch: Group Startup)

We will now start adding the actions, which need to be executed at the start of this layout. Below I will list them and I will also give a brief description on what the action does. Add the following actions to the event On start of layout.

-System: Reset global variables

Global variables are set to their default value.

  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • 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.

    youtube.com/watch

    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"

    Thank you.