[Dan Ebberts] “What’s the code for your expression?
Dan”
I found this code from a post. It’s to make a falling leaf effect, but I modified the code a little. I’m also using a checkbox to start the expression.
position
———————————————————————————–
control = effect(“Checkbox Control”)(“Checkbox”) ;
whattime=time-3;
if (control == 1){
sp=2;
amp=150;
gravity = 50;
x = Math.sin(whattime*sp)*amp;
y = Math.sin(whattime*1.5)*50;
value + [x,y];
}else{
value;
}
scale
————
control = effect(“Checkbox Control”)(“Checkbox”) ;
whattime=time-3;
if (control == 1 || value > 40){
gravity = 50;
z= whattime*whattime
value – [z,z];
}else{
value;
}
rotation
————————————————————————————
control = effect(“Checkbox Control”)(“Checkbox”) ;
whattime=time-3;
if (control == 1){
sp=2;
amp=5;
x = Math.sin(whattime*sp)*amp;
value – x;
}else{
value;
}