Forum Discussion
Close the project when time has elapsed
Hi, I've build a quizz in SL and there is a time frame of 30 minutes to complete it. Is there a way that if the user does'nt complete the quizz within that time frame, it goes to a slide that mentions that the time has elapsed?
3 Replies
- james457Community Member
Hello,
Yes, absolutely! You can achieve this in Storyline (SL) using a combination of variables, triggers, and the built-in timer functionality. Here's a step-by-step guide on how to implement a time-elapsed slide in your quiz:
1. Create a Time-Elapsed Slide:
Design a slide that will appear when the 30-minute time limit is reached. This slide should clearly indicate that the time has expired.
2. Set Up a Timer Variable:Create a numeric variable. Let's name it TimeRemaining.
Set the initial value of TimeRemaining to 1800 (30 minutes * 60 seconds). This represents the total number of seconds allowed.
3. Create a Timer on the First Quiz Slide:On the first slide of your quiz (or any slide that initiates the timer), add a trigger:
Action: Adjust variable
Variable: TimeRemaining
Operator: Subtract
Value: 1
When: Timeline starts
Object: (The slide itself)
Condition: TimeRemaining is greater than 0.
Add a second trigger to the same slide:
Action: Jump to slide
Slide: (Your time-elapsed slide)
When: Variable changes
Variable: TimeRemaining
Condition: TimeRemaining is equal to 0.
Add a third trigger to the same slide:
Action: Adjust Variable
Variable: TimeRemaining
Operator: Subtract
Value: 1
When: Timeline Reaches
Time: 00:01 seconds
Object: (The slide itself)
Condition: TimeRemaining is greater than 0.
Repeat: Repeat every time.
4. Carry the Timer Across Quiz Slides:On each subsequent quiz slide, add the following trigger:
Action: Adjust Variable
Variable: TimeRemaining
Operator: Subtract
Value: 1
When: Timeline Reaches
Time: 00:01 seconds
Object: (The slide itself)
Condition: TimeRemaining is greater than 0.
Repeat: Repeat every time.
Also, on each subsequent quiz slide add the trigger:
Action: Jump to slide
Slide: (Your time-elapsed slide)
When: Variable changes
Variable: TimeRemaining
Condition: TimeRemaining is equal to 0.
Explanation: e-zpassnh comThe TimeRemaining variable starts at 1800 seconds.
The first trigger on the first slide subtracts 1 from TimeRemaining every second the timeline runs, as long as TimeRemaining is greater than 0.
The second trigger on the first slide jumps to the time elapsed slide, when the TimeRemaining variable equals 0.
Best Regards- Marie-Claude125Community Member
Hi James,
Thank you so much for this step by step.
Couple of questions: 1) I don't have the repeat options in my trigger board (it's in French, but still don't have it...). 2) Do you know if this still works if I have a bank of 37 questions but I,ve set it up to only ask randomly 20 questions?
- NedimCommunity Member
To replicate the default timer behavior in Storyline, you need to implement a global JavaScript timer at the question master level. This timer must run continuously across all question slides in the question bank without interruption, ensuring that the time limit is respected throughout the entire process. Once the timer reaches its predefined limit, a "Time Limited" overlay should appear, with an OK button that allows the user to navigate to the Results slide. This behavior should closely mimic the standard Storyline timer functionality, where the system displays a time-out message when the time limit is reached, and the user can then proceed to view the results. I haven't tried James' solution, but if you're still interested in using the built-in quiz timer, it might be worth giving it a shot.
Example: