Forum Discussion

BalazsKiss-4481's avatar
BalazsKiss-4481
Community Member
11 months ago

Variable to be automatically incremented in every 7 seconds.

Hi Everyone,

I am fairly new to the world of Storyline variables, and I probably want to run before I learn to walk, but I guess I learn on the edge, so appreciate your help to get over a problem I am stuck at.

I am creating a gamified course element, and for that, I want my character to regain energy in every 7 seconds. Therefore, I would need a method that add +1 to a variable in every 7 seconds after an event (a button push) happened. Do you have any idea on how to make Storyline to count seconds after an event?

How would you solve this?

 

Thanks in advance!

 

Kindly,

SalvadorBali

    • Insert an object off the slide.
    • Give that object a 7-second motion path. (Be sure the path won't end up on the slide.)
    • By default, when you add a motion path, the program will add a trigger to move the on the motion path when the timeline starts. Edit that trigger so the the move happens when the event (e.g., a button click) happens. 
    • Add a trigger that adds 1 to the variable when the motion path completes. 
    • BalazsKiss-4481's avatar
      BalazsKiss-4481
      Community Member

      Thank you very much Judy!

      Although it's a workaround, it helped me a great deal! I have been using this extensively ever since you suggested it. Just one disadvantage: including a video in your e-learning makes it bigger and loads up slower, so while this works, this is not the best solution.

      I think Articulate should include a function to count the time (in seconds or milliseconds) after certain event happened. This would be of great help for many of us, I guess.

      Thanks for your suggestion!

      Kind regards,

      Balazs

  • You could count in milliseconds using Javascript (the world is overrun with samples of code that are used for timing).  Execute it when the action occurs, and when it ends have it change the variable.

    BTW, I disagree with your characterization of it as a workaround. Workaround has such a negative connotation. To me, it is good design practice to extend the built-in activities to match your needs.