Storing a lapsed time

hi.

thats what i have:
SCENE 1
i set up a timer.
the timer counts 1,2,3 … seconds.
after a special event , the timer stopps e.g. at “15” (example).
and this “15” is displayed in a textbox on the screen 1.

want i want to add now:
SCENE 2

  • storing the lapsed time “15” from scene 1
  • showing this timer result in a textbox in scene 2

how to?

Hi,

you need a global variable for that. So in scene 1 you store the value of the timer in the global variable and this variable will be also available in scene 2 where you can display it in a textbox.

globalTime

In this example the expression TimerElapsedTime() takes the timer’s value when your special event happens and stores it in the global variable timescene.

hi drona.
thanks again…
i will try that asap.

PS
gdevelop promises :“…build your game without coding…”
mmmh.
in my opinion without support from this great forum, it would be impossible to build anything (for me).

Yes, it’s a bit misleading. Coding is coding, it doesn’t matter if your are typing lines or if you are putting events together.

There’s an example showing how to do the platformer example with javascript coding. Feel free to take a look and compare with the standard codeless example. :slight_smile:

If you’re lost without the forum, maybe you didn’t take enough time to learn how to use the software and its resources.
“Without coding” doesn’t mean that you can achieve anything easily.

Good luck with your project :+1: