Slider question (simple I hope)

How can I customize a slider that has say (4) ticks at 0.25 distance between each tick, change the color of a ball for example.
like how can GD do this:
“If” slider is dragged (condition) to a value of.25 …“Then” (action) the ball changes color from white (ball1) to tan (ball2).
and “If” slider is dragged to .5 “then” the (ball2) changes to brown (ball3)…and so on. i am sure it has to do with creating a custom slider, or variable and things, but i am struggling to understand what variable or behavior. i know it has to do with tint of an object, maybe an animation. please help if possible.

So, your line object has a width that you can divide in three parts (to get four points at 0.33 distance), and you can assign any action to each of these values.
If selector.X() = Line.X() for the left end.
If selector.X() = Line.X() + Line.Width()/3 for the second one.
If selector.X() = Line.X() + 2*Line.Width()/3 for the third one.
If selector.X() = Line.X() + Line.Width() for the last one.

You should also do something to help the user reach those specific values, or it will be very hard to use, like:
If selector.X() > Line.X() + Line.Width()/4 and selector.X() < Line.X() + Line.Width()/2 → move selector to Line.X() + Line.Width()/3.

Ok, thanks. i will try to understand that. it makes about 60% sense to me at this stage of my learning. I am still very “beginner” at this. i may be taking on to much.
when you say:
If selector.X() = Line.X for the left end

is “selector” an extension, or a variable? and is “Line” the object? I guess i need a more specific explanation or example to look at.
so if i have:

i guess i dont know how to fill in the blanks for the “if selecor.X()” and “Line.X()”
I feel dumb for asking such basic stuff. I actually use to do visual basics years ago, but i am relearning a lot of this stuff.

In my message above, selector is an object (the ball part of the slider), and Line is another object (the line part of the slider).
I’m not sure if/how you can make that work with the slider extension you seem to be using.
On the left side go the conditions, so anything starting with “if” in natural language.
On the right side go the actions, either an animation change as you show, or a tint action.

Thank you very much Grunk.I will work on this and let you know if i got it working.

i dont think tthe slider extension i am using will work. it is this extension.

i may have to make a new slider extension or find a different one.

It seems that this extension has a ‘tick spacing’ setting/action, so you might want to play with it and see what you can make out of it. Don’t fear to experiment.

A simple solution would be to add the draggable behavior to the slider object and add these events:

You have to do some math of your own. This is based on a slider object that is placed at X:1155 Y:506 and alternates 4 animations between a length of 32 pixels (1155 - 1187 = 32 | 32 / 4 = 8). That’s why the animation is divided by 8. I think you will figure out the rest :slight_smile: