Platform tutorial help: ResultText field

0 favourites
  • 3 posts
From the Asset Store
A very simple to set up ZElevation based depth of field system for your game. Fully commented.
  • Hi,

    I've started trying out Construct to get a better understanding of what game design involves, as I'm a complete beginner to designing videogames but interested in the subject.

    I have completed the Shooter tutorial and the first part of the "Building a platform game - a beginner's guide" today.

    While I managed to get the platform tutorial working, I've become unstuck making the ResultText field show "Level 2 reached" at the correct time. (See page 6 of the tutorial).

    When the game starts the ResultText field says "Text".

    When Tim leaps onto platform 1 and scores 1 point, the ResultText changes to "Level 2 Reached".

    The "Game Over" ResultText appears at the correct point: when Tim has 0 health.

    The system I've put in is:

    15 Player? Platform on Landed

    16     System? Score => 25, Floor = 3? ResultText set text to "Level 2 reached"

    17 System? Health = 0

            ResultText set text to "Game Over"

            System wait 3 seconds

            System set Health to 3

            ResultText set text to ""

    Can anyone point me in the right direction for a fix? I've tried shuffling events about and quadruple-checked the variables and conditions are correct.

    My game's CAPX file is available on Dropbox.

    Thanks.

    • Richard

    dl.dropboxusercontent.com/u/5328690/Construct/platform%20tutorial%201.capx

  • I have looked at it, and you almost had it working :)

    To fix it, you have to move the ResultText in the "Platform on landed" to the bottom.

    Just add an empty one below "prevFloor >= Flooring.floor"

    Then change the ResultText to this:

    "Level " & Flooring.Floor & " reached"

    Then it will correctly write which level the player have reached.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks Nimos, that was a help.

    Your suggestion didn't do what I needed: "Level 2 reached" means you've got to level 2 in the game - not the second platform. The game is only meant to display that text when you score 25 and are on the top platform (Flooring.floor 3).

    So I added this at step 13, after set prevFloor to Flooring.Floor.

    13 System? Score < 25? ResultText Set text to ""

          System? prevFloor < 3

    This clears the ResultText status update clear, until you get to 25 points and reach the top level.

    I wouldn't have thought to try that without your input: thank you.

    Now I just have to work out how to stop the score resetting to 0 when Tim leaps out of the top of the layout. For now I've put in an invisible wall along the top of the layout, to prevent him leaping too high.

    • Richard

    dl.dropboxusercontent.com/u/5328690/Construct/platform%20tutorial%202.capx

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