Why does my variable cap at 2?

Get help using Construct 2

Post » Sun Aug 30, 2015 1:58 pm

This is what I have:
Image

But if I press down on the D-pad and the value is 2 for example, it won't go up to 3, it just stays capped at 2. Why is that?
Website Twitter Indie Developer
B
20
S
6
G
4
Posts: 206
Reputation: 2,954

Post » Sun Aug 30, 2015 2:24 pm

Maybe because you only look for less than 2 or greater 2 not for equal 2.
If your variable is 2 nothing will happen. Same for zero.
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Sun Aug 30, 2015 4:19 pm

Exactly as Asmodean said,
you have to use < 2 and >= 2.
B
6
S
1
Posts: 67
Reputation: 636

Post » Sun Aug 30, 2015 4:20 pm

I tried that before, same results
Website Twitter Indie Developer
B
20
S
6
G
4
Posts: 206
Reputation: 2,954

Post » Sun Aug 30, 2015 5:15 pm

That is because your two following events. The second event will immediately overwrite the result of the first event if the value is above 2.
B
24
S
3
G
1
Posts: 451
Reputation: 2,165


Return to How do I....?

Who is online

Users browsing this forum: rayolf and 22 guests