Time/Duration related condition
Colbys Dovi
I would like to trigger consequences based on :
A) How long the user has been inactive (absence of mouse movement on Desktop or scroll on Mobile)
B) How long a property's value stays unchanged.
Example : I'm building this prototype where a scrollbar is supposed to disappear after a certain time if the user stops interacting with the prototype. To do so, I would have liked to be able to do something like :
- Detect x value of scrollbar, if x value doesn't change for 4s, then drop opacity to 0.
- When x value changes again, bring opacity to 100
Jeffrey Clarke
Colbys Dovi Studio 7.9, expected for release at the end of September, will have a number of date and time functions added, which can aid in what you're trying to do.
That said, there are a number of ways you can achieve what you want today. One way is set an Opacity response to to happen after 4 seconds, and attach it to interaction. Each time you have interaction that is supposed to reset that timer, use a Stop response to cancel the opacity change, and set a new Opacity change for 4 seconds after that.
Jeffrey Clarke
Another way is to make a cancellable timer. This is covered in the Voice Prototyping Masterclass available at ProtoPie School:
https://learn.protopie.io/course/masterclass-in-advanced-voice-prototyping
Colbys Dovi
Hey Jeffrey Clarke: Thanks for tips. I'll try those :)
Ira X
Colbys Dovi — You can do this with the predefined variable $time. I happen to be using scroll direction for driving this, but using $time and formulas could work with any events; to do it differently or add more functionality:
Colbys Dovi
Ira X: Hey Ira, thanks for the tips, I'll try that :)