
0
Answered
How to realize this FOR?
Hello,
I am currently trying to realize this for in bolt, to learn how everything works.
for(float f = 0; f <= runtime; f += Time.deltaTime) {
LemonSlider.value = Mathf.Lerp(0, 100, f/runtime);
yield return null;
}
My setup currently is this and I hope it is somewhat right:
Also, would it be possible to make the part of "LemonSlider" a variable, so I can re-use this flow over and over for multiple sliders?
Bolt Version:
1.4.3f2
Unity Version:
2019
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Customer support service by UserEcho
I don't know how to recreate this for loop exactly like your code.
But I made a macro which lerps a float value. Maybe this helps you.
https://support.ludiq.io/communities/5/topics/1609-vector3-lerp-slerp-macro
Thanks! That seems mostly to work. At least the timer counts up perfectly!
But I can't get the value of the slider from 0 to 1.It just instantly jumps to 1 and sticks at 1.
edit: okay I just realized, that you don't throw a float of 1 in but have just the timer as value, so with a max value of 100 it fills up perfectly.
Big thanks!