How do I get total vertical distance and

Get help using Construct 2

Post » Sat Apr 11, 2015 7:48 pm

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 :cry:

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
B
54
S
10
Posts: 21
Reputation: 2,579

Post » Sat Apr 11, 2015 10:02 pm

deerta wrote: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)
deerta wrote: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?
Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Sat Apr 11, 2015 10:47 pm

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!!!
B
54
S
10
Posts: 21
Reputation: 2,579

Post » Sun Apr 12, 2015 2:17 am

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
B
54
S
10
Posts: 21
Reputation: 2,579

Post » Sun Apr 12, 2015 8:50 am

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...
Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Sun Apr 12, 2015 3:30 pm

Hi Korbaach,

Thanks!!
B
54
S
10
Posts: 21
Reputation: 2,579


Return to How do I....?

Who is online

Users browsing this forum: ChesVCF, engin20020, gamecorpstudio, yiuyiu6666 and 28 guests