Ending the level

This forum is currently in read-only mode.
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Hi guys,

    New kid in town here...

    The Construct is great and fun.

    I built a small game in order to be familiar with the basic functionality. It's a simple game where the player needs to hit 15 balloons with its bows. When the hits are 15 I want let the game run the last boom animation and then terminate. But I don't know how to do this.

    Any help will be appreciated.

    Here is a screen shot:

    <img src="http://www.mediafire.com/imgbnc.php/7df042261204e11ceb7e1801a98420db6g.jpg">

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Try doing *whatever event* system > Application > next layout. to switch to the next layout.

  • Thanks.

    I declared a global variable named FinishPeriod. After the 15th hit I do this variable to be increased by 1.

    When it reaches to 100 then I the application is terminated.

    But now I face another issue: Upon termination I want to give to player the choice of leaving the game or let him try again... In other words I don't know how to create and operate a menu...

    BTW: Here is my progress so far:

    http://www.mediafire.com/file/kvu6esvvszs9b7v/Balloon.zip

  • I am very impressed from the easiness of Constructor. Within a few hours I've manage to learn and build a minimal game. It's a great tool!

    Here is my first complete project.

    http://www.mediafire.com/file/kvu6esvvszs9b7v/Balloon.zip

  • Thanks.

    I declared a global variable named FinishPeriod. After the 15th hit I do this variable to be increased by 1.

    http://www.mediafire.com/file/kvu6esvvszs9b7v/Balloon.zip

    well this might sound somewhat technical but dont just do this:

    number of hits >= 15

    add 1 to global finishperiod

    this is against the timedelta rules and the period will be dependant on the refresh speed of the monitor, instead try:

    add timedelta to global finishperiod

    timedelta is a system variable that will always return one second when added every tick and is screen refresh screen independant. maybe someone could explain that better :)

  • Thanks for the info, ramma. This information lights a bit, to my darkness of Constructor!

  • A timeline might help here

    Create a new timeline and keep it as a separate object if you're using other timelines already (this will prevent future issues).

    Set the first period (eg "Main") to -1 duration, making it run indefinitely

    Set the second period (eg "Timeout") to however long you want the delay to be, eg. 2 seconds.

    When your trigger event starts (eg. arrow hits = 15) end the first period ("Main")

    Set the layout to change/end when the timeout period ends

    OR

    Make a function "end layout" using the function object

    When arrow hits = 15, call function after delay of eg. 2000ms

  • Hi Squish,

    indeed, this is a better solution for handling time events. I changed the project according to your guides lines.

    Here is the updated project for all newcomers (like me) to Construct:

    http://www.mediafire.com/file/rjut7gqhsqqaq8f/Balloon01.zip

    Thanks for the tip.

  • Mediafire seems to be dead for some reason - I'll get back to you.

    http://downforeveryoneorjustme.com/mediafire.com

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)