Greetings, and sorry for the simple question. After a bunch of searching, I couldn’t quite solve it and I’m still in the early phases of learning C# …
I’d like the attached C# script to have the added functionality of an Interval input, allowing the count speed to be adjusted in ms – as in, for example, the attached Python component found here:
Currently, the script simply counts up to a max value, and counts back down to 0 when reached (and back again) - this is good, but I’d like to slow it down and speed it up without having to overshoot the max and divide the output.
This post has given me a clue as it relates to the above, but I’m a bit stumped on how to bring this into to attached C# component:
This is helpful, and I’m sorry for the confusion. I’m looking to keep the C# script as-is, but add the interval functionality. I only posted the Python version as a reference for what I’d like to add, but I don’t want it to replace the max value input and the counting down once it’s reached.
Here’s an example for a use for this - for quick animations within the GH environment.
Edit - instability is fixed: “increase” needed to be set back to true when the reset button is pressed to avoid the value going negative if the button is pressed during a decrement.