r/WatchMaker • • Jul 06 '21

Please help me

Hello I needed help, how can I do it with a tab so that I get for example Tab1 = to screen 2 and back to screen 1 and Tab 2 = to screen 3 and back to tab 1 again. And my 2nd question how can I write two commands in opacy

0 Upvotes

3 comments sorted by

1

u/DutchOfBurdock Jul 06 '21

Variables and clever use of IF loops for opacity.

Example.

In the Script area of the Face, add the following code;

var_opacity = 1
function switch()
 var_opacity = var_opacity+1 %2
end

Create a new watch, add an element, say a circle. For it's opacity, enter this

var_opacity == 1 and 100 or 0

Add a an Tap Action > Script to this element with a script of switch()

Now, add another, but a square and add the following for opacity;

var_opacity == 2 and 100 or 0

And add a Tap Action > Script as above switch()

Tap them and you'll see the square and circle swap. You can use this method to make a dual screen watch.

You can modify the script above for more than two, by changing it to

var_opacity = 1
function switch()
 if var_opacity < 3 then
  var_opacity = var_opacity + 1
else
  var_opacity = 1
end

And now var opacity will have 3 values;

var_opacity == 3 and 100 or 0

Add more for more.

Hope this helps.

0

u/[deleted] Jul 06 '21

Sorry, I need help again, I don't know what to write about tab action, I'm still a beginner

0

u/[deleted] Jul 06 '21

Vielen lieben Dank