Help!!! I am going insane with Variables


I hope someone can help me.

I am building a training module which contains 4 different lessons. The main slide is a menu, where they select the lesson they want to learn about. In this menu slide they have a counter, which says '1 of 4 lessons completed'. I am using a variable to change the number of lessons completed. The problem is, if the person accesses the lesson more than once it counts it again. So I am getting something like '7 out of 4 lessons completed'... which is wrong.

I also have special awards which are awarded if the user score 100% in each lesson- so there should be a maximum of 4 badges awarded. Again, whenever the timeline starts on the menu slide it counts additional badges, as its looking at the variable every time.

So, basically - how do I keep these variables counting, every time the timeline of the main menu starts?

I hope this makes sense, I have been researching but can't figure it out...

Someone out there, PLEASE HELP!!!





5 Replies
Matthew Bibby

Hey Tony,

Here is one way to approach it.

Create some new T/F variables called:

  • Lesson_1_Completed
  • Lesson_2_Completed
  • Lesson_3_Completed
  • Lesson_4_Completed

Have them all set to False by default. Then as the learner finishes each lesson, change the relevant variable to True.

On your Menu, have the following triggers:

  1. Set Number_of_Lessons to 0 when timeline starts
  2. Add 1 to Number_of_Lessons when timeline starts if Lesson_1_Completed is equal to True.
  3. Add 1 to Number_of_Lessons when timeline starts if Lesson_2_Completed is equal to True.
  4. Add 1 to Number_of_Lessons when timeline starts if Lesson_3_Completed is equal to True.
  5. Add 1 to Number_of_Lessons when timeline starts if Lesson_4_Completed is equal to True.

This will force the menu to recalculate the number of lessons completed each time. You'll need to set your menu to Reset to Initial State for this to work correctly.

The same approach will work for your badges.

Let me know if you need any further assistance with this.