- Create a slider widget on another card to act at memory for the timer.
ptimer - If you want, make accessing it easier with a deck level script:
MEMORY:save.widgets - In your card script, make the timer go up on every view of the card.
MEMORY["ptimer"].value:MEMORY["ptimer"].value+1 - Paint your letters with alternating colors from the color view in decker
- Choose values for when you want the colors to switch, and switch the colors in lil code. In the last change, reset the timer.
if MEMORY["ptimer"].value > 20
patterns[33]:"%h" parse "ff4f69"
patterns[34]:"%h" parse "ff8142"
end
if MEMORY["ptimer"].value > 40
patterns[34]:"%h" parse "ff4f69"
patterns[33]:"%h" parse "ff8142"
MEMORY["ptimer"].value:0 # Reset the timer so the colors change on loop.
end - Make sure you include go[card] at the end of your card script so the card script runs on a loop.
- You're done!