Forum Discussion

DivyaMenon-3c95's avatar
DivyaMenon-3c95
Community Member
4 years ago

Calculating Time on a Slide

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?

  • 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?

  • 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!