Score On a Time System

Get help using Construct 2

Post » Thu Jan 10, 2013 7:12 pm

Hi everyone
How do i set my score on a time system,so every 0.1 seconds of being alive you are awarded 10 point ?
thanks in advance.
   
B
3
Posts: 2
Reputation: 284

Post » Thu Jan 10, 2013 7:15 pm

You can do:

Event: "For every X seconds" in your case 0.1 seconds
"Add to Points = 10"

B
31
S
7
G
2
Posts: 157
Reputation: 3,735

Post » Mon Jan 14, 2013 5:02 pm

Thanks,i'll try.
B
3
Posts: 2
Reputation: 284

Post » Mon Jan 14, 2013 5:35 pm

Just like ByR said:

Make a global variable "Points"

Event: System -> Every 0.1 seconds
Action: Add to: Points, Value: 10

Then you can add a text object and place it in the Layout, example:
Add a text object -> Name it text_points

Then add to the previous event
Action -> text_points -> Set text -> "Points: " & Points

This way, every 0.1 second that points are added, you'll see them in the text object.

You can also place the text_points -> Set text in another event, for example Every tick. That way the text object is updated every tick.

Hope this helped.
B
13
S
5
G
2
Posts: 64
Reputation: 3,012

Post » Mon Jan 14, 2013 5:41 pm

I recently created a little example capx which happens to have similar functionality: Linky.
B
24
S
8
G
7
Posts: 756
Reputation: 7,202


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt, Lancifer and 27 guests