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,340 visits, 37,341 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

Group: Collisions

When we come in contact with an enemy, the game ends. So, which collisions should cause the game to end?

-obj_Propeller with obj_Girder and with obj_Hammer

-obj_Player with obj_Girder and with obj_Hammer (only when obj_Player is pinned to obj_Propeller)

We also want the game to end when obj_Propeller hits the left or right side of the screen. Since there is no object to collide with on the left or right side of the screen, we can use a comparison condition. You could use an object off the screen on the left and right side, but I find it unnecessary to add objects that will increase the object count.

The two orange objects used for collision detection. Always ask yourself if there is another way of doing something without having to add extra objects. Less objects is less memory usage.

These are the 5 events that will handle the collisions.

The actions needed for these events are the same for each event. So, instead of copying and pasting the same actions in each event, we will make a function with these actions and use the Call function for the action.

Click on the Functions tab. Add the event Function: On function and name it "PlayerHit". Go back to the Collision group and add the action Function: Call function "PlayerHit". Do this for each event.

We will add the actions for On function "PlayerHit" in the last part of this tutorial.

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