Blog Post
DanielHolthouse
Community Member
Jonathan's sonar concept got me thinking about time and speed. This demo uses the slide elapsed time variable to calculate the speed between two points. Happy flying!
DEMO: https://360.articulate.com/review/content/9e7e2443-64fb-450c-80cf-20144cce4457/review
DEMO: https://360.articulate.com/review/content/9e7e2443-64fb-450c-80cf-20144cce4457/review
Jonathan_Hill
3 years agoSuper Hero
Nicely done Daniel. Did you use the Slide.ElapsedTime variable and, if so, how did you get it to reset each time?
- DanielHolthouse3 years agoCommunity MemberThanks, Jonathan. I'm using the Slide.ElapsedTime variable to effectively timestamp the starting point and ending point. When the airplane intersects with an invisible object at Point A, I set a variable called "takeOff" to the current Slide.ElapsedTime. Similarly, when the airplane intersects with an invisible object at Point B, I set a variable called "landing" to the current Slide.ElapsedTime, and then subtract one from the other to get the "flight time" or time between intersecting A and B. The Slide.ElapsedTime never resets, but since I'm just getting the difference between two times, the relative difference is all that matters, and just gives the illusion of resetting. Clicking the "reset" button simply jumps to the start of the slide again, but as you pointed out, the Slide.ElapsedTime takes no notice! So that keeps ticking on in the background. I added a little "Show Details" link in the top-left of the player that will reveal the variables in action. Hope to have some time this evening to post the .story file itself.
- Jonathan_Hill3 years agoSuper HeroThat's a neat workaround, thanks for the explanation Daniel. As I'm using the rapidly changing variable as an effect in itself in my demo, I don't know whether your method could work for me as my design currently stands. But it's definitely how I'd build it now I know, thanks.
Perhaps I could employ Slide.ElapsedTime to change a custom variable, retaining the effect, but which I could then reset each time? 🤔
Inspiring.- DanielHolthouse3 years agoCommunity MemberI think that would work! I think the trick would be calculating the "new" elapsed time. Even though you could reset the custom variable, it won't count up like the Slide.ElapsedTime. But I think if you can capture the Slide.ElapsedTime at the moment the user clicks "reset", you could use that as your tare weight, so to speak, when you need to calculate your new elapsed time. I'm not entirely sure I'm making sense... would be interesting to play around with this concept a little more!