Problem with opacity and DS tag

I was messing around with the codes, and can´t understand why this code doesn`t work.

I wanted to just make a demo, of a watch changing faces every x seconds.
For example between seconds 10 and 20 i will show image x1, between 20 and 40 image x2.
Between 40 and 60 another image, from 0 to 10 nothing.

Example:
$((#Ds#)<10)&&((#Ds#>20))?100:0$

Shouldn`t that equal :
If (Actual second) < 10 and (actual second) >20
then
Opacity 100
Else
Opacity 0
Endif

Also is there a code I can add so they fade in and out ?

Hi @joedoughty
The problem is the logic in the code will never be true.
The Seconds value (#DS#) can never be less than 10 AND more than 20 at the same time.

You probably want the opposite, which is more than 10 AND less than 20 (values 11-19)
$(#Ds#)>(10)&&(#Ds#)<(20)?100:0$

Also: Be careful with the parenthesis when using Boolean Logic. See examples here: https://docs.facer.io/c-advanced/boolean-logic/

1 Like

You can try this for the fading effect:

$(#Ds#)>(10)&&(#Ds#)<(20)?(interpAccel(#DWE#, 0, 1000, 3)*100):0$

(I haven’t tested this yet so can’t confirm it’s 100% accurate)

1 Like

Super tks!!!
Will try as soon as i get back home

Yeah this works perfectly, thanks heaps, I tried the symbols both ways thought I was going crazy, I had messed up with the parenthesis.

Cant get the fading bit to work yet, but at least i can try a few effects on the watch

I tried modifying this code from @Dazstacey

But I am not having much luck