Forum Discussion

Andrianina's avatar
Andrianina
Community Member
2 months ago

Advent Calendar in Storyline

Hello everyone,

I'm working on an advent calendar in Articulate Storyline with 24 pockets, each meant to unlock on its corresponding day in December (e.g., pocket 1 unlocks on December 1st, pocket 2 on December 2nd, and so on). The challenge I'm facing is that I can't figure out how to set it up so that the pockets unlock automatically each day without having to re-upload the SCORM file daily.

Has anyone a solution for this? Any advice or suggestions would be greatly appreciated!

Thanks in advance!

 

 

Hello,

Je suis en train de créer un calendrier de l’Avent dans Articulate Storyline avec 24 cases. Chaque case est censée se déverrouiller automatiquement le jour correspondant (par exemple, la case 1 le 1er décembre, la case 2 le 2 décembre, etc.). Le problème, c’est que je n’arrive pas à trouver comment faire en sorte que l’ouverture se fasse automatiquement chaque jour, sans devoir recharger le SCORM quotidiennement.

Est-ce que l'un d'entre vous aurait une solution pour ça ? Je suis preneuse de toute suggestion ou idée !

Merci d’avance !

  • CatherineG's avatar
    CatherineG
    Community Member

    Hi!

    My first thought would be to use some really simply JavaScript when the timeline starts to check the date and unlock accordingly:

    //Get the Storyline Player
    let player = GetPlayer();

    //Get the day and month
    let currentTime = new Date();
    let day = currentTime.getDate();
    let month = currentTime.getMonth() + 1; //add 1 because months start at 0, so january = 0

    //put the data into the Storyline variables
    player.SetVar("day", day);
    player.SetVar("month", month);

     

    Make sure to make number variables named day and month in your Storyline file then simply have your pockets change state to normal when the timeline starts on the slide if month = 12 and if day is greater than or equal to the corresponding day.