making a random value everytime i check a checkbox
Hi,
I'm trying to make my slider control have a random value when you check the checkbox control and when you uncheck the value to use is that of the slider control.
Here is one of the code that i try but my slider doesn't change anything anymore only the seed random (the one suppose to choose a number randomly)
seedRandom(index, timeless = true);
var randomizedValue = random(0, thisComp.layer("Control_Snowflakes").effect("Change_Shape_MID")("Slider"));
if(thisComp.layer("Control_Snowflakes").effect("Randomizer")("Checkbox") == 1){
randomizedValue
}else{
thisComp.layer("Control_Snowflakes").effect("Change_Shape_MID")("Slider")
}
var storedRandomValue = thisComp.layer("Control_Snowflakes").effect("Seed Random")("Slider");
if(thisComp.layer("Control_Snowflakes").effect("Randomizer")("Checkbox") == 1){
seedRandom(index, timeless = true);
var newRandomValue = random(0, thisComp.layer("Control_Snowflakes").effect("Change_Shape_MID")("Slider"));
value + newRandomValue - storedRandomValue;
newRandomValue;
}else{
storedRandomValue;
}
Thank you for helping me
