Animated Text/Score Board

Get help using Construct 2

Post » Sat May 04, 2013 7:02 am

Hey everyone!

I am trying to make an animated counter. One you would normally see at the end of a video game. I started with this code in the shot below but going up by one is far to slow. If I go up by ten or a hundred I lose the full effect of the numbers flashing. Can anyone help or seen this done? Thanks!

B
53
S
14
G
13
Posts: 818
Reputation: 17,414

Post » Sat May 04, 2013 8:09 am

Why don't you try Every X seconds (X could be 0.2 for exemple)
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
43
S
18
G
18
Posts: 2,106
Reputation: 16,436

Post » Sat May 04, 2013 10:15 am

Since you're displaying text every tick, try using dt instead of a solid number.

You'll probably want 2 variables: Score and Score_Display. Then when Score is greater than Score_Display, have it add 100*dt to Score_Display.

This way, the text shows the Score_Display variable every tick, and every tick it constantly adds to the variable until the score is the same.
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Sat May 04, 2013 11:42 am

[QUOTE=Thndr] Since you're displaying text every tick, try using dt instead of a solid number.

You'll probably want 2 variables: Score and Score_Display. Then when Score is greater than Score_Display, have it add 100*dt to Score_Display.

This way, the text shows the Score_Display variable every tick, and every tick it constantly adds to the variable until the score is the same.[/QUOTE]

So far this is what I have come up with. But its not giving the desired effect. Is this what you mean?

B
53
S
14
G
13
Posts: 818
Reputation: 17,414

Post » Sat May 04, 2013 11:55 am

Here's an example of displaying the score over a fixed amount of time. It doesn't matter if the score is 100 or 10000000 it will be count up from 0 to score over 2 seconds (or whatever value you set).
fixedTimeScoreDisplay.capx
B
55
S
28
G
18
Posts: 1,520
Reputation: 25,305

Post » Sun May 05, 2013 8:58 am

Hmm, complicated math there but I love it! Thank you so much.
B
53
S
14
G
13
Posts: 818
Reputation: 17,414

Post » Fri Jul 24, 2015 3:40 pm

Message: sandronize can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi, I was play around with your capx , but i can't come up with it.

I added on keyboard pressed add 50 do score
but when i press again the counter restart from zero wich is the timer value
I tried to put timer value = score but doesent work

can you take a look?
thanks
https://www.dropbox.com/s/om42fyeltk2p4 ... .capx?dl=0
B
6
S
1
Posts: 54
Reputation: 543


Return to How do I....?

Who is online

Users browsing this forum: LaurenceBedford, Lordshiva1948, NN81 and 14 guests