I want to alternate between two different layers being either shown or hidden every other minute of the hour. So I would suppose if #Dm# is divisible by 2 it could either be true or false. I’m just not sure how to write the conditional expression to achieve this in the opacity field.
Something to the effect of:
layer 1: $#Dm#/2==without a decimal?100:0$
layer 2: $#Dm#/2==with a decimal?100:0$
Thanks for your help!
Welcome to the Community, I’m sure someone with some Math skills will be able to help you soon, but in the meantime…have fun creating
Hi thanks for the welcome.
I’ve managed to do it and turns out to be simple. It works for me but not sure if it was done in the right way:
This will return opacity value based on every other minute of the hour.
One of the ways to do this with a short formula is using the modulo expression: it returns the remainder of a division.
Layer1 opacity: $#Dm#%2>0?0:100$
Layer2 opacity: $#Dm#%2==0?0:100$
This example uses seconds instead, to illustrate the mechanism more quickly:
And yet another way to do it by odd or even minutes
X or Y: $(#Dm#%2)=0?999:160$
X or Y: $(#Dm#%2)=1?999:160$
I had to go back and edit/fix the labels in that example that I created in haste… I’ve been up all night binge watching the wild adventures of Uhtred of Bebbanburg on Netflix!