Forum Discussion
Javascript for 12 hour clock
https://360.articulate.com/review/content/6520f497-57b5-4213-9468-ca2fc57f4b9f/review
here the updated script
the time is now minus 4 minutes (in milliseconds)
Jürgen
- DiarmaidCollins4 years agoCommunity Member
Thank you so much for the solution Jurgen. That is deeply, deeply appreciated.
If I wanted to use that new script AS WELL as the original, I would obviously have to rename the variable 12Hour to something new, like, 12HourMINUS4, so the only thing I would have to replace in your code would be on line 22,
player.SetVar("12Hour", hour+":"+minute+" "+am_pm);
to
player.SetVar("12HourMINUS4", hour+":"+minute+" "+am_pm);
Would that be correct? :)
I know I am being a pain in the ass here, buuuuuuuut... both code scripts would have to be called on in the relevant slide?
Is there any way the 12Hour value can be calculated, and THEN the new value, 12HourMINUSX, (automatically) derived from that?
- MathNotermans-94 years agoCommunity Member
The functionname is the same too, so you either need to change that too...or change the function so it sets 2 variables. Assuming you using them on the same trigger. If you use them on 2 separate triggers due to the fact Storyline scope is local ( trigger A has no knowledge about trgger B ) you can do as you plan.
Related Content
- 4 months ago