Forum Discussion
MohamedAmineSAL
3 years agoCommunity Member
Addition of slide's elapsed Time
hello,
i want to know how to add elapsed time of a quiz slide with an other one. and to have the sum of both in the result slide.
when i use the variable "slide.elapsedtime" it shows just how ma...
MariaCS
3 years agoStaff
Hi, Mohamed.
Thank you for reaching out!
Since the variable slide.ElapsedTime will change its value depending on which slide the user is currently viewing, you need to assign it to a different variable per slide.
I'm attaching a sample .story file with three slides (two that track the amount of time the user spends on the slide, and one results slide that calculates the total):
- Slide 1: Set Slide1_Time (a numeric variable) to variable Slide.ElapsedTime when the user clicks the Next button.
- Slide 2: Set Slide2_Time to variable slide.ElapsedTime when the user clicks the Next button.
- Slide 3:
- Add Slide1_Time and Slide2_Time to the numeric variable Total_Time
- Set Total_Seconds to Total_Time
- Divide Total_seconds by 1000 (converting the time into seconds)
Here are the variables used:
And here's what this looks like in Preview:
I hope this helps!