-
Save value data of an expression
Hi,
I am trying to fix something in my expression and I will appreciate the help.
I have a simple loopOut(‘pingpong’) expression on two keyframes on the rotation property.
I wanted to stop and start the loop a few times, so I created a Checkbox and linked an ‘if’ expression like this:if (effect(“Checkbox Control”)(“Checkbox”) == 1)
{
loopOut(‘pingpong’);
}
else
{
transform.rotation;
}It works well except that there is a jump whenever the checkbox is turning off.
The rotation value jumps from whatever the value was at this time to the value of the second keyframe I gave at the begining.I think I need to save the value of the rotation at every ‘if’ loop and then return it back in ‘else’
but I didn’t find a way how to do it.
Thanks a lot!