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,645 visits, 37,910 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

We will now do the opposite. To do this, we will use the Else condition. Right click on the event obj_Player is not mirrored and add an Else condition, or press X on the keyboard.

Select all the actions from the event obj_Player is not mirrored by selecting the first action, holding down the Shift key, and selecting the last action. Press Ctrl C to copy. Select the Else condition and then Ctrl V to paste the actions.

Because Else is actually Is Mirrored, there are two actions we need to change.

-obj_Player is not mirrored (facing to the right)

-obj_Propeller's angle of motion set to 0

We do not want the events in this group to be executed when the game starts. We will have to set this group to deactivated and set it to activated later on. Go back to On start of layout and after Reset global variables, add the action System: Set group active. Type "Player Contols" in the Group name field and select Deactivated for the State.

Group: Player Rotation

Depending on which direction obj_Player is facing (condition 1), we want obj_Propeller to rotate towards a given angle by 2 degrees (action). We only want the rotation to start when obj_Clouds starts moving downwards (condition 2). You could use another object, but since the clouds are on the Background layer, I chose to use this object. Thus, for this to work, we will need 2 conditions in 1 event block.

So, how do we check if obj_Clouds is moving? If you take a look at all the available Bullet conditions for obj_Clouds, there are only 2 to choose from.

Compare speed would not be the right choice for this to work because this just compares the Bullet speed value and not if obj_Clouds is actually moving. Compare distance travelled would work just fine in this case. If an object is moving then there is a distance travelled.

Create an event with these 2 conditions with the action which rotates obj_Propeller to an angle of 12 by 2 degrees. When done, copy and paste this event. Change the condition and action for the other direction. On the next page, you will see how the events are built up. Give it a try first.

  • 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.