How do I setup STEP for custom made slider

Get help using Construct 2

Post » Mon Mar 13, 2017 3:55 pm

i have made a custom slider
i have create 4 global variables
max
min
value
step
alls are working except STEP
i dont know how to make it possible
i dont have any formula for this
please help
Image
B
64
S
39
G
46
Posts: 656
Reputation: 32,728

Post » Mon Mar 13, 2017 4:53 pm

B
66
S
24
G
7
Posts: 1,513
Reputation: 11,037

Post » Tue Mar 14, 2017 5:16 am

No No No this not m saying
this i have made already
"Step" means
I if max value is 100 and step is 5
then slider will go 20,40,60,80,100 pixel like grid means slider will complete in 5 steps
i do not want to move it smooth
if their any way of doing this kind of thing ??
Image
B
64
S
39
G
46
Posts: 656
Reputation: 32,728

Post » Tue Mar 14, 2017 11:33 am

@luckyrawatlucky

You probably want to do something similar to snap-to-grid.

I've made a stepped slider based on that here:
capx (r233)
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
33
S
9
G
7
Posts: 450
Reputation: 6,780

Post » Tue Mar 14, 2017 12:32 pm

@OddConfection you have done something similer but their is problem
When i increase step value then slider size also increases
Image
B
64
S
39
G
46
Posts: 656
Reputation: 32,728

Post » Tue Mar 14, 2017 2:01 pm

@luckyrawatlucky

I've updated the capx so that the slider background shouldn't change size now.

It's just changing the first event where the Tiledbackground width is set, replacing that action with:
System: Set StepImageSize to TiledBackground.Width/Steps

I'll upload it shortly to same link:
capx (r233)
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
33
S
9
G
7
Posts: 450
Reputation: 6,780

Post » Wed Mar 15, 2017 5:43 am

Thank you Sir
Now i have what i want
Image
B
64
S
39
G
46
Posts: 656
Reputation: 32,728


Return to How do I....?

Who is online

Users browsing this forum: Artcadev and 26 guests