đŸ§© [KLWP] Show 1 image out of 4 when leaving the home screen, then hide it after 10 seconds

H🌝ello,
I’m trying to build a very specific behavior in KLWP using 4 independent images, whose visibility is controlled only via opacity.

:bullseye: General goal
I have 4 images, and only one image must be visible at a time, never more than one.

:repeat_button: Desired behavior

:one: When I am on the home screen (screen = 1)

No image should appear “out of nowhere”
If an image was already visible before I arrived on the home screen, it stays visible when I arrive
When I arrive on the home screen, a 10-second timer starts
After 10 seconds, the currently visible image disappears
While I stay on the home screen:
No other image should appear
Image selection (random or sequential) is completely frozen

:two: When I leave the home screen (screen = 0)

One image out of the 4 becomes visible at the exact moment I leave the home screen
I do not see the image appear (it appears while I’m outside the home screen)
Only one image is visible at a time (out of the 4)
This image stays visible as long as I don’t return to the home screen
When I come back to the home screen, this image:
Stays visible
Continues until the 10-second timer finishes
Then disappears

:three: Full cycle logic

Every time I leave the home screen, a new image (random or sequential) is selected
This image is displayed when I leave the home screen
While I remain on the home screen, no new selection must occur

:warning: Important constraints

Only one image visible at a time
No image overlap
Image appearance must happen outside the home screen
The 10-second timer starts only when arriving on the home screen
Visibility is controlled only via opacity
I use si(screen) to detect home screen vs other screens

:wrench: What I’ve already tried

Global List
Global Number
df(ss) for time handling
tu(seq)
Opacity formulas depending on screen
But I can’t manage to:
Freeze image selection while staying on the home screen
Prevent any image change or appearance while on the home screen
Correctly start the 10-second timer only when arriving on the home screen

:red_question_mark: My question

What is the correct KLWP structure / logic to:
Have only one image visible out of 4
Make an image (out of the 4) become visible when leaving the home screen
Keep that image visible when returning to the home screen
Trigger a 10-second timer on arrival to the home screen, after which the image disappears
Prevent any new image appearance or change while staying on the home screen
Restart the image selection (random or sequential) only after leaving the home screen again

Any help, global logic, or example KLWP setup would be greatly appreciated :folded_hands:

In french:

:puzzle_piece: [KLWP] Afficher 1 image parmi 4 en quittant l’écran d’accueil, puis la cacher aprĂšs 10 secondes
Bonjour,

J’essaie de mettre en place un comportement prĂ©cis dans KLWP avec 4 images indĂ©pendantes, dont la visibilitĂ© est gĂ©rĂ©e uniquement par l’opacitĂ©.

:bullseye: Objectif général

J’ai 4 images, et une seule doit ĂȘtre visible Ă  la fois, jamais plusieurs en mĂȘme temps.

:repeat_button: Comportement souhaité

:one: Quand je suis sur l’écran d’accueil (screen = 1)

Aucune image ne doit apparaßtre « de nulle part »
Si une image Ă©tait dĂ©jĂ  visible avant mon arrivĂ©e sur l’écran d’accueil, elle reste visible Ă  mon arrivĂ©e
À mon arrivĂ©e sur l’écran d’accueil, un compteur de 10 secondes dĂ©marre
Au bout de ces 10 secondes, l’image visible disparaüt
Tant que je reste sur l’écran d’accueil :
Aucune autre image ne doit apparaĂźtre
La sĂ©lection d’image (alĂ©atoire ou sĂ©quentielle) est complĂštement figĂ©e

:two: Quand je quitte l’écran d’accueil (screen = 0)

Une image parmi les 4 devient visible au moment oĂč je quitte l’écran d’accueil
Je ne vois pas l’apparition de l’image (elle apparaĂźt hors Ă©cran d’accueil)
Une seule image est visible Ă  la fois (parmi les 4)
Cette image reste visible tant que je ne reviens pas sur l’écran d’accueil
Lors du retour sur l’écran d’accueil, cette image :
Reste visible
Continue jusqu’à la fin du compteur de 10 secondes
Puis disparaĂźt

:three: Cycle complet

À chaque dĂ©part de l’écran d’accueil, une nouvelle image (alĂ©atoire ou Ă  la suite) parmi les 4 est sĂ©lectionnĂ©e
Cette image sera affichĂ©e au moment oĂč je quitte l’écran d’accueil
Tant que je reste sur l’écran d’accueil, aucune nouvelle sĂ©lection ne doit avoir lieu

:warning: Contraintes importantes

Une seule image visible Ă  la fois
Aucune superposition d’images
L’apparition de l’image doit se faire hors Ă©cran d’accueil
Le compteur de 10 secondes dĂ©marre uniquement Ă  l’arrivĂ©e sur l’écran d’accueil
La visibilitĂ© est gĂ©rĂ©e uniquement par l’opacitĂ©
J’utilise si(screen) pour dĂ©tecter Ă©cran d’accueil / autres Ă©crans

:wrench: Ce que j’ai dĂ©jĂ  essayĂ©

Global List
Global Number
df(ss) pour la gestion du temps
tu(seq)
Formules d’opacitĂ© dĂ©pendantes de screen
Mais je n’arrive pas à :
Bloquer la sĂ©lection d’image pendant que je suis sur l’écran d’accueil
EmpĂȘcher tout changement ou apparition d’image tant que je reste sur l’accueil
Lancer correctement le compteur de 10 secondes uniquement Ă  l’arrivĂ©e sur l’écran d’accueil

:red_question_mark: Ma question

Quelle est la bonne structure / logique dans KLWP pour :
Avoir une seule image visible parmi 4
Faire en sorte que l’image (parmi les 4) devienne visible au moment oĂč je quitte l’écran d’accueil
Conserver cette image visible lors du retour sur l’écran d’accueil
DĂ©clencher un compteur de 10 secondes Ă  l’arrivĂ©e sur l’écran d’accueil, au terme duquel l’image disparaĂźt
EmpĂȘcher toute nouvelle apparition ou changement d’image tant que je reste sur l’écran d’accueil
Relancer la sĂ©lection (alĂ©atoire ou sĂ©quentielle) uniquement aprĂšs avoir quittĂ© Ă  nouveau l’écran d’accueil

Toute aide, logique globale ou exemple de configuration KLWP serait vraiment apprécié :folded_hands:

Hi there,

I would suggest you to wrap the image in a group (Overlap Group or Stack Group), then set the group’s visibility to formula and use this code snippet as the formula:

$if(si(screen)=NN, ALWAYS, REMOVE)$

NOTES

  • NN: the screen index to check
  • There is no way to delay the visibility toggle

I hope this would help.

:smiling_face::+1:

1 Like

Hello, it works, thank you very much :blush:!

Do you know how I could make it disappear after a few seconds without reappearing or “blinking”, as long as I don’t leave the home screen?

I tried using opacity with something like:

$if(df(ss)%2,100,0)$

but this only makes it “blink”.

Goal:

It appears when I’m on my home screen, then disappears 10 seconds after it appears.

It should not reappear as long as I stay on the home screen (screen=1).

When I leave the home screen (screen=0) and come back (screen=1), it should appear again and disappear after 10 seconds, without blinking :cross_mark:.

Thanks again for your help :blush:

In french:

Bonjour ça marche je vous remercie :blush: !

Savez vous comment puis-je faire en sorte que cela disparaisse au bout de quelques secondes sans rĂ©apparaĂźtre ou “clignoter”? Tant que je nais pas quitter l’écran d’accueil.

J’ai essayĂ© avec l’opacitĂ©:

$if(df(ss)%2,100,0)$ par exemple. Mais cela ne fait que faire '“clignoter”

Objectif : apparaĂźt lorsque je suis sur mon Ă©cran d’accueil disparaĂźt au bout de 10 seconde aprĂšs apparition. Ne rĂ©apparaĂźt pas tant que je suis sur l’écran d’accueil (screen=1).Lorsque je quitte l’écran (screen=0) et reviens (screen=1) rĂ©apparaĂźt et disparaĂźt au bout de 10 seconde sans repaĂźtre comme un clignotement :cross_mark:.

Encore merci pour votre aide :blush:

Hi there,

You might be interested in trying to use animation to achieve your goal.

See my TechTips ‱ Screen Transition post on this forum, and download the example preset.

I hope this would help.

:smiling_face::+1:

KLWP does not support a real “delay after screen change” timer.

Formulas can only switch states (forward/back/reset), but they cannot wait, count time after an event, or run something only once.

Animations also cannot guarantee this behavior, because:

animations do not always reset when you leave the screen

if you switch screens quickly, the animation may not finish

delayed animations may start or stop at the wrong moment

KLWP has no event‑based triggers or persistent variables

Because of these limitations, the effect you want:

“Show → wait 10 seconds → hide → stay hidden until I leave the screen”

is unfortunately not possible in KLWP in a fully stable and reliable way.

So, I’ve been thinking about your idea and here’s what you can try.

You can try experiment with Flow, here is a simple version you can try:

Create an Overlap Group and put your images inside.

Create a global variable, for example showimg, set default value to 0 (text).

Put this formula into the layer’s opacity value:

$gv(showimg)$

Create a Flow with trigger formula:

Code

$si(screen)=1$

Add actions in this order:

Formula:

Code

$100$

Set Global Var: showimg (store mode: text)

Delay: 10 seconds

Formula:

Code

$0$

Set Global Var: showimg (store mode: text)

This way your image will appear on the first screen and disappear after 10 seconds.

But if you switch to the second screen very quickly, the image will still stay visible until the 10 seconds pass.

You can additionally put this formula in the layer visibility:

$if(si(screen)!=1, remove, always)$

if you want the image to disappear instantly when you change the screen.

But even this is not a perfect solution if you switch screens very fast back and f

orth.

I think you already know how to show images randomly, right? :wink: