Calculating Time on a Slide

Dec 10, 2021

Hi,

I'm trying to create a game where I need to calculate the time it takes a player to complete the game. The total duration of the game is set to 3 minutes. What variable can I create to calculate the time spent on an interaction?

3 Replies
Maria Costa-Stienstra

Hi, Divya.

Thank you for reaching out!

The two articles below will go over the elapsed time variables and how you can use them in your project:

There was also a recent E-Learning Challenge that might give you some ideas:

  • 16 Ways to Use Time-Based Interactions in E-Learning #352: Challenge | Recap

I hope this helps!

Divya Menon

Hi Maria,

Thank you for sharing this. Here's what I am trying to achieve.

1) I'm creating a drag-and-drop interaction which has a total duration of 3 minutes, otherwise the game will be over.

2) I want to calculate how much time it takes someone to complete this game.

3) Based on the time it takes them, I want to calculate how much time it takes them to approximately match each drag item to its drop target.

When I use the elapsed time variable, it's throwing up an error for me. Could you help me with this, please?

Maria Costa-Stienstra

Hi, Divya.

I'm hoping others in the community have suggestions for what you're trying to achieve!

I created a sample file (attached here) that I believe will help you with items #1 and #2. Since calculating specific user interaction (dropping one object on another) is not one of the elapsed time options, item #3 might require a Javascript workaround, and I'm not very familiar with it.

I created a 5-minute Peek 360 video showing you my changes to a freeform Drag and Drop Interaction.

I hope this helps!