# Random images shown

Hi,

Is it possible to show random images or shapes? I mean, a different one every time the watch wakes. And another thing, I want to show a random number from 0 to 9 every 24h, any idea?

First one is relatively easy
Just use the formula in transparency
\$(wakeRand(1,N))==n?100:0\$ for each image or shape, where N is the total number of images and n is the number of the specific image youre scripting.
Let me think the second, thatâ€™s not easyâ€¦

2 Likes

great!! thank you, there is an expresion `(rand(1, 10))` but im not sure whether it will works as I want

That rand keep generating random numbers between the 2 of the expresion every time. You cantâ€™t generate one and take it to a VAR, thatÂ´s would be awesomeâ€¦ but no. It keeps changing the numbers. Its what I used to make vibrate the vumeter needles, remember? Itâ€™s not what you are looking forâ€¦ Make a blank watch, add a text with (rand(1,10)) and save, preview it and look yourself to understand better that expression.

Hi!
This is what Iâ€™m working on. Background and colors change every time you wake your watch up, but I wanted to know whether is there any possibility to mix 2 formulas, because Iâ€™m using that quoted code in the transparency field, but, I wanted to add a fade in effect as well, so,

How can I mix the next formulas and turn them into just one?
this: \$(wakeRand(1,N))==n?100:0\$ and this one: ((interpAccel(#DWE#, 0, 2, 2)*100))

http://www.riczurdo.es/randomtheme.mov

1 Like

Beautiful, congrats!
Well, I recomend to use the fade formula on transparency and the wakeRand formula on x or y position
\$(wakeRand(1,N))==n?160:-200\$
That way, if the image is selected by random it stays onscreen and it will fade in, all the others keeps offscreen.
PD: if you really wanna combine both formulas I think it will be
\$(wakeRand(1,N))==n?((interpAccel(#DWE#, 0, 2, 2)*100)):0\$

Thank you @carlosfilippa I think now is working how I wanted, I also wanted to add that rotation effect at the begining as you can see in the video but for now is enough, here is 3am and I need some rest

Thank you!!

By the way, on the web preview it seems to be slower than on my watch and phone preview.

http://www.riczurdo.es/this.mov

1 Like

Yes its slower. Glad you made it! Congrats

It should be possible to set values to VARsâ€¦
Canâ€™t understand why it is not possibleâ€¦

This is exactly what I was looking for tonight. thanks!

1 Like

follow up question to random images, Iâ€™m looking to have a random image show up, if you tap anywhere on the watch, for a brief period of time. Is that possible?

1 Like

Question one . Are you a PRO or Premium Subscriber . On Facer that is the only way you get Tap Interaction . If not lets look at another way to do the job . Random numbers are generated on wake . I have found no other way of using Random .

well thatâ€™s definitely me out then. bummer.

1 Like

You can use the motion detector to switch on a different image or sequence. Or run a timer that is not exactly the same time for the show.

I made this as an example and it has been quite popularâ€¦

Always the same thing happensâ€¦ Iâ€™ll just take a quick lookâ€¦ then I spend the next hour inspecting how on earth youâ€™ve done it.

2 Likes

Ha Ha. It is not easy Inspecting others work . It is probably the random butchering of some decent code posted somewhere else.
If you are stuck I will do my best to explain it. @petruuccios uses a Descriptive kind of maths where it is eay to see how it operates . Sadly I tend to poke arround till it works. Not very scientific .

2 Likes

@masterboyhr & @russellcresser
That is the way I do all my expressions, but instead of â€śpoking aroundâ€ť I just use good old fashioned Redneck Engineering.

2 Likes

Got a room full of Monkeys Typing away they come up with something now and again.

2 Likes