Comment afficher un timer?

Bonjour,

J’ai déjà créé un timer (un chronomètre) dans une de mes scènes (scène initiale), cependant j’aimerai pouvoir que ce temps qui court soit “additionné” lorsque je voyage d’une scène à l’autre pour enfin qu’au retour à ma scène initiale, le timer affiche le temps global que j’aurai passé sur mon coscape.

Merci par avance

Hi @Melina_Malandain,

You can use CoSpace Properties (global variables, available when Advanced CoBlocks are enabled) to pass values between scenes and scripts.

Please see this remixable demo for how to implement a similar feature for maintaining a score:

Hope this helps! Let me know if you have any further questions. If this solves your problem, please mark this post as the Solution.

Many thanks,
Geoff @ TechLeap

Merci de votre réponse, j’avais déjà vu cette aide mais je ne voyais pas comment l’adapter pour le timer vu que ma variable “timer” est en constante incrémentation sur chaque scène de manière indépendante.
Je vais essayer et au besoin je reviendrais vers vous.

Merci par avance,

Yes, try to implement it using this code. The concept is exactly the same - you are passing a number from one scene to another and adding to it.

Good luck! Let me know if you still have problems… or if you have success!

Geoff @ TechLeap