Reset Value
Posted: Sat Jan 23, 2021 8:37 pm
Hi,
I have an InputSelector module which chooses 1 of 4 images to display. For this module, I use an Increase function, and the Wrap function to rotate the Input# through 1 to 4 to change the images. Pretty simple.
I have a scaling module then. I want to increase the x and y scale value of the images over time. By itself that's easy to do. However I want to RESET the scale back to 1, every time the image changes. The reset has to happen or be synced to Input# of the InputSelector module.
Here's the tricky part - I want the scale or scaling values for x and y to increase much faster than the Increase function used to change or rotate the images. So I can't have one global Increase function for both.
So while the Increase function in the InputSelector module is moving from 0 to 6
when the value is 0 to 1 in the InputSelector module, then I want the scale values in Scale module to run from 0 to 300 (it's moving faster)
then once Input # changes - I want to reset the scale value back to 0 in the Scale module
So....the reset of the scaling needs to be synced to values in the InputSelector module, or to a global variable.
I thought if I could pass a variable into the Wrap() [aka mod] function, then I could reset the modifier value that way. But I can't.
I tried some expressions like if(x%2=0, 0, x) but these don't genuinely RESET the modifier value, they assign it a value (here zero) once the expression is true and then it's back to input value when it's not true.
Any ideas would be appreciated. I hope I explained it well.
Thanks
Vmusic
I have an InputSelector module which chooses 1 of 4 images to display. For this module, I use an Increase function, and the Wrap function to rotate the Input# through 1 to 4 to change the images. Pretty simple.
I have a scaling module then. I want to increase the x and y scale value of the images over time. By itself that's easy to do. However I want to RESET the scale back to 1, every time the image changes. The reset has to happen or be synced to Input# of the InputSelector module.
Here's the tricky part - I want the scale or scaling values for x and y to increase much faster than the Increase function used to change or rotate the images. So I can't have one global Increase function for both.
So while the Increase function in the InputSelector module is moving from 0 to 6
when the value is 0 to 1 in the InputSelector module, then I want the scale values in Scale module to run from 0 to 300 (it's moving faster)
then once Input # changes - I want to reset the scale value back to 0 in the Scale module
So....the reset of the scaling needs to be synced to values in the InputSelector module, or to a global variable.
I thought if I could pass a variable into the Wrap() [aka mod] function, then I could reset the modifier value that way. But I can't.
I tried some expressions like if(x%2=0, 0, x) but these don't genuinely RESET the modifier value, they assign it a value (here zero) once the expression is true and then it's back to input value when it's not true.
Any ideas would be appreciated. I hope I explained it well.
Thanks
Vmusic