How do I get total vertical distance and

0 favourites
  • 6 posts
From the Asset Store
Cue in the war drums and battle cadences with Total War Game Music Loops!
  • Hi all,

    I tried to do some research before posting and running into a few issues.

    Issue 1:

    I'm trying to create a HUD in a vertical direction but the text is fixed in the one location then goes off the screen.

    I did try tweaking the parallax but no go

    Issue 2:

    I'm trying to get the total distance from Players starting point to either when they would die or reach the End point sprite. I did try the various forum post suggestions but most were for horizontal scrolling type games and I didnt really see any for vertical scrolling games.

    Any suggestions would appreciated

    Link to CAPX

    http://1drv.ms/1aCBjD3

  • Issue 1:

    I'm trying to create a HUD in a vertical direction but the text is fixed in the one location then goes off the screen.

    ...first put your HUD text on the screen(dotted area)

    Issue 2:

    I'm trying to get the total distance from Players starting point to either when they would die or reach the End point sprite. I did try the various forum post suggestions...

    Try this one..

    capx:

    http://s000.tinyupload.com/index.php?fi ... 8694296903

    .....do you know how to save High score to Web storage?

  • Hi Korbaach,

    Aaaahhhh I see now about the HUD, makes sense doh!! My next step was working on the high score which I see you did an awesome job with as well as cleaning it up a bit, really appreciate it. I have a few good forum posts saved for the web storage I'm going to try and follow up on them. If i run into any issues I'll let you know.

    thanks again for the help saved me a few hours of head smashing the keyboard!!!

  • Hi Korbacch,

    I ran into a bit of an issue. I got the web storage set up but its not saving the high score only the score when I hit the ground. I have Top 10 scores set up but it only replaces #1

    Here's the CAPX so you can see where I went wrong.

    http://1drv.ms/1cmvvyT

  • I guess you've followed this tutorial.. https://www.scirra.com/tutorials/581/to ... ays?page=1

    first rename your "varDistance" in something like "YourCurrentHeight"

    ......rename your"High_Score" variable in something like "YourMaxHight"

    add new variable like in tutorial HighScore=0,0,0,0,0,0,0,0,0,0

    ..now you want to compare "YourMaxHight" with "HighScore"....

    ..and add new event sheet for your high score layout...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Korbaach,

    Thanks!!

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