Forum Discussion
Triggers based on timing of key input
Is there any way to have a trigger based on the timing of a key being pressed? For example, the user has to press a certain key on the keyboard to the correct beat to pass. If they press the key out of time, they fail.
I'm assuming the timing factor would have to be a condition on the trigger, but not sure how to go about this.
Thanks!
5 Replies
- AstutisArtic013Community Member
Just to add some more context, this will be an interactive video, so they'll be pressing the keys to be in time with a video.
- NejcZDCommunity Member
Here's one idea: you could place some objects off the screen (so user's don't see them) and in the timeline put them in the "time slots" of when a certian key needs to be pressed. For example, an box would be shown between 1s and 2s.
Then you start adding triggers.
Do WHATEVER ACTION YOU WANT -> when user presses a key -> if the state of box is NORMAL.
I hope that makes sense. It should work. :)
- AstutisArtic013Community Member
Hi Nejc.
Thanks for the response. I did consider using timeline based triggers, however the video may take awhile to load depending on the user's internet connection, so the timing needs to be tied to the video, rather than to anything on the timeline of the slide, if that makes sense?
- NejcZDCommunity Member
Yeah, I understand, but I am afraid you can not tie anything to a video.
- AstutisArtic013Community Member
I was wondering if there might be some JavaScript code that could be used?
Related Content
- 10 months ago
- 10 years ago
- 8 months ago