Get help using Construct 2

### » Mon Mar 03, 2014 11:38 am

Hi, anyone knows how to do eg

The second 12 to 8 = Sprite6 (3stars)
The second 8 to 4 = Sprite6 (2stars)
The second 4 to 0 = Sprite6 (1 star)

I have Sprite (timebar) I have two variables MaxTime and Time. I want to make a score, depending how long it takes, you have more or less stars.

Yesterday I spent an hour trying everything and nothing ... or tell me how to stop time when two objects touch, anything goes me.
B
13
S
2
Posts: 297
Reputation: 1,717

### » Mon Mar 03, 2014 11:45 am

You have mutliple way to do this :

If you want to stop the time when 2 objects touch, you have to start a timer at the beginning of the game/level.

Create a global var called time, with a value of 0.
Create another var called touched, with a value of 0.
Add an event with two conditions :
- Every tick
- touched = 0
(action) => add dt (delta time) to time

When the two objects touch set touched to 1, you will stop incrementing the variable time.
B
40
S
15
G
5
Posts: 295
Reputation: 6,129

### » Mon Mar 03, 2014 4:04 pm

I used set time scale = 0 to stop time and it works. Not understanding how to apply the delta, I'm a bit clumsy with construct 2
B
13
S
2
Posts: 297
Reputation: 1,717

### » Mon Mar 03, 2014 4:10 pm

Do as you want but using timescale for this is not a good idea. Read tutorial for the delta time related stuff.
B
40
S
15
G
5
Posts: 295
Reputation: 6,129

### » Mon Mar 03, 2014 4:20 pm

I did what you said does not work
B
13
S
2
Posts: 297
Reputation: 1,717

### » Mon Mar 03, 2014 5:03 pm

How to do this then
The second 12 to 8 = Sprite6 (3stars)
The second 8 to 4 = Sprite6 (2stars)
The second 4 to 0 = Sprite6 (1 star)
B
13
S
2
Posts: 297
Reputation: 1,717

### » Mon Mar 03, 2014 5:39 pm

If you have the time at the end it's just conditions :

timer < 4 -> set sprite6 to frame X (the one with one star)
timer >= 4 and < 8 -> set sprite6 to frame X
timer >= 8 and < 12 -> set sprite6 to frame X

Looks like you are missing the basics of C2 you should really read some tuts.
B
40
S
15
G
5
Posts: 295
Reputation: 6,129

### » Mon Mar 03, 2014 6:08 pm

Condition that you use to give two values​​? I have this

I am not so new, but I struggle to understand
B
13
S
2
Posts: 297
Reputation: 1,717

### » Mon Mar 03, 2014 7:12 pm

B
40
S
15
G
5
Posts: 295
Reputation: 6,129