timer

Get help using Construct 2

Post » Wed Apr 09, 2014 9:26 am

Hi

i have added a visible timer at the top corner of my game to show the player how lng they have been playing,

i have made a global variable called clock with inital value to 0, and a text box on the game that is set to update with the clock variable.

how do i add the action to the event sheet to add 1 second to the clock variable every one second
B
4
S
1
Posts: 46
Reputation: 542

Post » Wed Apr 09, 2014 9:50 am

just add it as you stated yourself:

Every 1 second -> increment the global variable by 1
B
44
S
10
G
8
Posts: 437
Reputation: 6,463

Post » Wed Apr 09, 2014 10:01 am

i did this but for some reason it shows the value on the game as, 1.546789326547 seconds something stupid i only want it show the value in seconds as 1 second then 2 seconds rather than every ms
B
4
S
1
Posts: 46
Reputation: 542

Post » Wed Apr 09, 2014 10:05 am

and when it gets to 1 minute to change to 1:00 instead of 60
B
4
S
1
Posts: 46
Reputation: 542

Post » Wed Apr 09, 2014 10:35 am

Without a attached capx from your side, it is hard to tell what you are doing wrong, but please have a look at this example.
You do not have the required permissions to view the files attached to this post.
B
44
S
10
G
8
Posts: 437
Reputation: 6,463

Post » Wed Apr 09, 2014 3:58 pm

thank you very much worked perfect :)

also do you know how i can make the clock scroll with the screen and player in the platform game rather than going off the screen when the player moves?
B
4
S
1
Posts: 46
Reputation: 542

Post » Wed Apr 09, 2014 4:17 pm

Try to use the Anchor to keep it on the screen, Anchor works really well for Hud and Ui.
Please Support Ocean Explorer.
http://igg.me/p/735007/x/6915815
B
14
S
4
G
3
Posts: 125
Reputation: 2,645

Post » Wed Apr 09, 2014 4:23 pm

thank you :D
B
4
S
1
Posts: 46
Reputation: 542


Return to How do I....?

Who is online

Users browsing this forum: David181 and 16 guests