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,184 visits, 37,084 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: Vertical Down Scrolling

All objects moving down, either need to be stopped, repositioned, or destroyed when a given position has been reached. If we did not do this, the objects would still be moving off screen into infinity. This can cause your system to lag, or even cause it to crash.

Create events for obj_Girder, and obj_Hammer which will destroy them when their Y position is greater than 780.

Create an event for obj_Clouds which will set its Y postion to -382 when its Y position is greater than 768.

Create an event for obj_Pipes which will disable its Bullet behavior when its Y position is greater than 768, plus its height. Remember that we set obj_Pipes' origin at the bottom left. If we did not add the height, obj_Pipes would stop immediately when its Y postion was greater than 768. Also, add the action which sets obj_Pipes Y position at 1255.

Copy and paste this event for obj_Ground.

Group: Girders and Hammers

After the girders and hammers have been destroyed, we need to create new ones which will enter the screen from the top. For the event we need 2 conditons. If obj_Girder's Y position is greater than 770 and Trigger once. Create this event with these 2 conditions.

We are also going to need a local variable to set the angel for obj_Hammer.

Create on within the scope and name it HamerAngle. We used this name previously, but since it's within its own scope, there will be no conflict.

We already know what the actions are going to be. Remember the For loop?

Copy and paste those actions in this event. We will have to add and change a couple of things.

-replace obj_Girder's Y position with -332

-just before the second obj_Girder is created and after all the actions of the second obj_Girder, add two actions which enable obj_Girder Bullet behavior and obj_Hammer Bullet behavior.

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