Discuss Scratch
- Discussion Forums
- » Suggestions
- » Non-number values in slider variables
- rontinn
-
Scratcher
85 posts
Non-number values in slider variables
In slider variables you can only have numbers, and I think that you should be able to put letters or words in them. I suggest that when you go to change a sliders range there should be a button that says other values, and you can use that to select how many values you have and what they are. Example:
Value 1: red
Value 2: orange
Value 3: yellow
This could be used for yes or no, choosing a background in a game, mountain, canyon, ocean, field, numbers that aren't in order, 1, 3, 5, 7, 9.
Value 1: red
Value 2: orange
Value 3: yellow
This could be used for yes or no, choosing a background in a game, mountain, canyon, ocean, field, numbers that aren't in order, 1, 3, 5, 7, 9.
Last edited by rontinn (Nov. 30, 2020 14:20:33)
- NanoPIex
-
Scratcher
500+ posts
Non-number values in slider variables
When would you need this? The point of sliders is so that scratchers can change the numerical value of a variable. I don`t know what it would do with words and also this seems too complex for newer scratchers.
- pavcato
-
Scratcher
1000+ posts
Non-number values in slider variables
When would you need this? The point of sliders is so that scratchers can change the numerical value of a variable. I don`t know what it would do with words and also this seems too complex for newer scratchers.It would be pretty simple, you would just do
set value [1] of [variable v] to [word]::variablesbut I guess this could easily be worked around with lists.
- rontinn
-
Scratcher
85 posts
Non-number values in slider variables
When would you need this?You could use it for changing colors or other customization things
I guess this could easily be worked around with lists.How?
- gosoccerboy5
-
Scratcher
1000+ posts
Non-number values in slider variables
Support. I've felt like I would like to set a slider to yes/no before but it doesn't let you do that. I'd like that to happen.
- pavcato
-
Scratcher
1000+ posts
Non-number values in slider variables
You could make a slider that corresponds with a list like putting a word on a list item, then showing the list thing when you reach a desired number on the slider:I guess this could easily be worked around with lists.How?
if <(slider) = [1]> then
set [variable v] to (item (1 v) of [list v] :: list)
end
- gosoccerboy5
-
Scratcher
1000+ posts
Non-number values in slider variables
So is the slider variable hidden or not? If it is hidden, I don't see how you can change the slider. If it isn't hidden then you have two variables in the place of one. Not pretty. Plus that means you need to make an extra variable (I have variable OCDYou could make a slider that corresponds with a list like putting a word on a list item, then showing the list thing when you reach a desired number on the slider:I guess this could easily be worked around with lists.How?if <(slider) = [1]> then
set [variable v] to (item (1 v) of [list v] :: list)
end
)- rontinn
-
Scratcher
85 posts
Non-number values in slider variables
I tried this already, it doesn't workYou could make a slider that corresponds with a list like putting a word on a list item, then showing the list thing when you reach a desired number on the slider:I guess this could easily be worked around with lists.How?if <(slider) = [1]> then
set [variable v] to (item (1 v) of [list v] :: list)
end
- fdreerf
-
Scratcher
1000+ posts
Non-number values in slider variables
There's a more efficient workaround that requires no if statements at all: https://turbowarp.org/457308316, however, it requires an extra variable and a list. Personally, I never found that one extra variable was a big deal, and obviously, you'll have a list of items to select through anyway, though I can see how in certain situations one extra variable can be monumental. I think that it would be much easier to just use a list for the selected items as it can be changed with code and in much simpler ways. You could right-click a variable and make it a slider like normal, but there'd be an extra option besides setting min and max to “link” a list to the slider.You could make a slider that corresponds with a list like putting a word on a list item, then showing the list thing when you reach a desired number on the slider:I guess this could easily be worked around with lists.How?if <(slider) = [1]> then
set [variable v] to (item (1 v) of [list v] :: list)
end
- rontinn
-
Scratcher
85 posts
Non-number values in slider variables
If you did this and you wanted it to look like the slider you'd have to put it over the sliderThere's a more efficient workaround that requires no if statements at all: https://turbowarp.org/457308316, however, it requires an extra variable and a list. Personally, I never found that one extra variable was a big deal, and obviously, you'll have a list of items to select through anyway, though I can see how in certain situations one extra variable can be monumental. I think that it would be much easier to just use a list for the selected items as it can be changed with code and in much simpler ways. You could right-click a variable and make it a slider like normal, but there'd be an extra option besides setting min and max to “link” a list to the slider.You could make a slider that corresponds with a list like putting a word on a list item, then showing the list thing when you reach a desired number on the slider:I guess this could easily be worked around with lists.How?if <(slider) = [1]> then
set [variable v] to (item (1 v) of [list v] :: list)
end
- Discussion Forums
- » Suggestions
-
» Non-number values in slider variables




