need help with sliderbars

Get help using Construct 2

Post » Fri Mar 10, 2017 2:39 pm

I have two sliderbars
slider bar 1
slider bar 2
Each slider bar have minimum value 0 and max value 10

what combination of events i should use to receive that:

when slider bar1 value is 10
Slider bar2 value should decrease to 0
automaticaly


When i choose any slider and set to middle (value 5)

second slider should be in middle too (value5)

Also when slider bar 2 going to upper values
slider bar 1 should decrease down (example 8 -2)
B
25
S
8
Posts: 219
Reputation: 2,181

Post » Fri Mar 10, 2017 3:03 pm

You would need a variable for each slider bar to store the current value and then compare them.

Variables Slider1 = 0 Slider2 = 0

On Slider1 = 5 set Slider2 = 5

On Slider2 = 6 Set Slider1 =4

and so on.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,825

Post » Fri Mar 10, 2017 3:43 pm

@IGDev

actually, just set the other slider to 10 - current slider value

so,

slider1 On Changed > set slider2 value to 10 - slider1.value

and

slider2 On Changed > set slider value to 10 - slider2.value
B
98
S
35
G
20
Posts: 438
Reputation: 17,875

Post » Sat Mar 11, 2017 10:29 am

yes its only way, for 10 steps its good solution and i use this idea
but for 1000 values will be 1000 conditions
B
25
S
8
Posts: 219
Reputation: 2,181


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests