Rotation using Conditionals

I managed to sort out moving things on and off screen using conditionals thanks to members of this community ( @russellcresser @kourosh @tom.vannes ) but now I’m trying to rotate a weather disc using the following:
$(#WCCI#)==11?215:$$(#WCCI#)==13?265:$ etc (the weather disc has more weather conditions) It seems to only accept the first condition and not the following ones. I also tried using $(#WCCT#)==Thunderstorm?215:$$(#WCCT#)==Rain?265:$
These conditionals are killing me - I’m probably out of condition! :smiley:

2 Likes

Im not at my computer, but did you try removing the parentheses around #WCCI#? Also, I use only one = sign.
Edit- I just tested and it should work. You know that the condition will always show 09 in the creator, right? Test it out with another value like $#DMM#=2?60:$$#DMM#=3?100:$ and you’ll see it works. Not sure how you are trying to rotate it though without seeing your face.

3 Likes

@BIELITZ
I’ve used a similar expression for the x value, not rotation.
$#WCCI#==01?122:$$#WCCI#==02?122:$$#WCCI#==03?122:$$#WCCI#==04?122:1000$

Maybe you need a final value if they are all not met, similar to where I placed the 1000?

@thomasfmal, it used to be that there sometimes is an incompatibility on some watch brands with a single = sign, universal compatibility is ==. Maybe it’s fixed now, or not, I don’t know. But to be sure, a double == is what I usually use.

1 Like

What You have there works fine for me on creator . With == and = with and without () . I don’t know about a watch . If you post your disk image I will give it a go .

Actually, I’ve been noticing that in multi expressions like these lately that the last alternate value, is getting tacked onto the end of the correct result. For example, in expressions such as:

$#tag#==1?A:$$#tag#==2?B:C$

If #tag#=2, the resulting value should be B, but it actually returns a value of BC. Never used to be like that. I think Facer may have a bug here.

It broke about half a dozen of my faces & I had to rewrite some of them to fix them. :angry:

1 Like

@bradtc When you say Returns a value BC do you mean B*C.

I had a thing where i was trying to show a VAR with a + in front of it. No Show. On another Platform that We should not mention CHRS are shown in Conditionas with “CHRS” . I do wonder if leaving the second conditiona operand / task empty is a good Idea. Great if you are showing a string in the first one. I feel that the Syntax is being Massaged while we try to use it .

@russellcresser,

Actually no, not B*C. If say the value of B is 200 and the value of C is 888, the result will be 200888. Needless to say, this messes up a few things. Definitely a bug.

1 Like

@bradtc

Where/why are you using the expression you wrote $#tag#==1?A:$$#tag#==2?B:C$

When I’m using these types of expressions it’s usually to move something a certain distance, such as along the x axis based on which part is true.
For example, I would use $#DE#=Fri?A:$$#DE#=Sat?B:$ to move something the distance of A or B. I would not be attaching a C at the end all by itself. So, if it was Friday, it would move the amount A and if it was Saturday it would move the amount B and so on…
I would expect a C by itself at the end to mess things up because that C just gets attached to the A or B whichever is true.

1 Like

@thomasfmal,

The expression used to work where the C would be the resultant value if all previous checks didn’t result in A or B resultant values. It doesn’t do that any more. Either that is on purpose or it’s a bug. So I’m not using it any more. That’s kind of what I was complaining about a few posts above, as I had to go back to some faces from a few years ago and change them.

1 Like

@bradtc oh, I see. I never used it that way in the past so wouldn’t have seen an issue.

1 Like

To me this seems to be working just fine (with or without brackets). For example I extended it to full circle divided evenly for 9 different conditions with just 8 conditional expressions
$#WCCI#==02?40:$$#WCCI#==03?80:$$#WCCI#==04?120:$$#WCCI#==09?160:$$#WCCI#==10?200:$$#WCCI#==11?240:$$#WCCI#==13?280:$$#WCCI#==50?320:$ the 9th position is 0 for whatever else condition (including 01 in this case. If I wanted it to give any other number, would have to add condition for it too).

I wonder, why should this result always in either A or B or C ? Those are 2 independent conditions laying next to each other. So if #tag# does not equal B it shows single C only if #tag# does not equal A either, but if it equals A, both conditions give results so two results should appear next to each other.

1 Like

So Brad let me be Clear. Are you trying to show CHRS B or C. Most people are using conditionals with the ELSE empty and not understanding that the conditional is capable of making decisions.
I have actually used it with DO empty and the ELSE worked fine. I was trying to get a + plus in front of a VAR number. It showed a Minus - automatically. OH well.

If Facer is Playing with the Conditionals they might try line it up with other platforms where it would be.

$#DWFHS#>12?"PM":"AM"$

$#DWFHS#>12?18:6$

In my view what is below is wasting the conditional.

I think there are other ways to do single task stuff but I am not an Expert.

$#DWFHS#>12?"PM":$

$#DWFHS#>12?:"AM"$

Thanks everybody here - I used @petruuccios 's first expression which is, as far as i can see the ssme as my own but with one difference it worked! I have a second disc to which I used the same expression but deleted some of the tags and conditions and changed angles and …it failed! I’m not at my pc for a couple of days so I’ll try again later.

It looks to me that ‘if then else’ is now just ‘if then’.

Once I get the second disc sorted - I have a third!
I may spend some time on this watch getting it right which is sort of ironic as its raison d’etre is to tell me the weather which considering where it gets its data from is never right!

1 Like

I have a feeling that Multiple IF THEN on one line will work. But I have a feeling that multi IF THEN ELSE fails as a logical contradiction. Marvin gets worried then. I will do a test in a bit.

That’s the impression I get too - it doesn’t explain though why it failed with my second disc. I’m not at my pc to check - I’ll get back when i know a little more.

1 Like

@BIELITZ This worked fine for me . I noticed it did not like () in the text box .
May be the issue is Debugged now ,

$#DWFSS#>=180?"PM":"AM"$---$#DWFSS#>=180?1:0$---$#DWFSS#>=180?YES:410$

@russellcresser thanks for that…there are several ‘new’ things in there for me to understand . When I get back to my pc I’ll have a play :slight_smile:

1 Like

OK - that didn’t work for me either and I have to now admit that I’m stuck!
Here’s my watchface----

I have two discs - Conditions 1 & 2 which have the weather conditions text on a transparent background. It’s 2 discs because i don’t want to reduce the font size and all 9 conditions won’t fit on one disc. The weather condition text on the face is just for convenience and wont appear on the finished face.
Condition 1 disc rotates as expected as does Condition 2 disc but not when both are visible. I deleted the mask I’m using so the text on the discs needs to appear between the 2 yellow guides.
From my struggles it seems to me that I must be missing something simple - can someone in the community point me in the right direction (no pun intended) please?

1 Like

So . You were so very close but no Biscuit . There is nothing wrong with your code but it does not dismiss the code if it is FALSE .

The only thing I can get to work is to dismiss the Discs when they are FALSE with Opacity .

I will let you sort out the Second conditional .

If you want to post the resources I can make a test if you dont get it .

ROTATE WEATHER DISC

small error here

$#WCCI#==50?:0$$#WCCI#==01?45:$$#WCCI#==02?105:$

$#WCCI#==50?0:$$#WCCI#==01?45:$$#WCCI#==02?105:$

OPACITY

$#WCCI#==50?100:0$$#WCCI#==01?100:0$$#WCCI#==02?100:0$

In such case I would not complicate my life more than needed. Make 9 images, one with each curved text turned to the section of your watch face and each with its own conditional expression for opacity.

If you still take it like a challenge, then I would split and turned the texts so, that with 0°rotation the section would be clear on both images. Then there wont be any overlapping texts

$#WCCI#==01?263:$$#WCCI#==02?216:$$#WCCI#==03?161:$$#WCCI#==04?103:$$#WCCI#==09?52:$

$#WCCI#==50?320:$$#WCCI#==13?278:$$#WCCI#==11?219:$$#WCCI#==10?162:$

1 Like