timer counter

Get help using Construct 2

Post » Tue Jul 17, 2012 9:56 pm


as I can make a timer for layer
terminer when the player having the total time played,
and the time spent by each of the layers??
B
12
S
4
G
4
Posts: 138
Reputation: 3,710

Post » Tue Jul 17, 2012 10:59 pm

I have not tested this but maybe you take the current time at the beginning of the level and save it as starting time. When the player finish the level, you take current time - starting time. The diference is the time for the level.
B
13
S
3
G
3
Posts: 15
Reputation: 2,600

Post » Tue Jul 17, 2012 11:01 pm

and how do I access the time spent by each level
B
12
S
4
G
4
Posts: 138
Reputation: 3,710

Post » Wed Jul 18, 2012 5:13 am

[QUOTE=tianxxxchris]
as I can make a timer for layer
terminer when the player having the total time played,
and the time spent by each of the layers?? [/QUOTE]

Use the for every second event and a global Var
Ex:
Global Var "Timer"

For every 1 second: Add 1
                    to "Timer"

"Timer" you will reset
so Create another Var to store the Timers count before the end of each level.
This also works with holding your Score.
Ex:
Player collides with "End Trigger"
Add "Timer" Var to "TotalTimer" Var
Set "Timer" Var to zero

Then proceed to next level/Layout

Ex: display;
Every Tick: Set Text
            to: "Timer: " & LevelTime Erndog2k2012-07-18 05:19:02
B
27
S
11
G
1
Posts: 246
Reputation: 5,048

Post » Wed Jul 18, 2012 5:22 am

[QUOTE=Erndog2k] [QUOTE=tianxxxchris]
as I can make a timer for layer
terminer when the player having the total time played,
and the time spent by each of the layers?? [/QUOTE]

Use the for every second event and a global Var
Ex:
Global Var "Timer"

For every 1 second: Add 1
                    to "Timer"

"Timer" you will reset
so Create another Var to store the Timers count before the end of each level.
This also works with holding your Score.
Ex:
Player collides with "End Trigger"
Add "Timer" Var to "TotalTimer" Var
Set "Timer" Var to zero

Then proceed to next level/Layout

Ex: display;
Every Tick: Set Text
            to: "Timer: " & LevelTime [/QUOTE]


mmm all rigth
B
12
S
4
G
4
Posts: 138
Reputation: 3,710


Return to How do I....?

Who is online

Users browsing this forum: imnotspecial, tomi71, totoe and 15 guests