Forum Discussion
Use Case: Triggers Advancing on Character Recognition
Scenario: I want my user to type a specific word, phrase, or expression and have Storyline advance to the next slide or layer once that word has been correctly typed by the user. No additional key presses such as Enter or Tab. Java Script is not an option.
Currently in Storyline, I can set a trigger to advance when the user types the last character of a word or statement by using the Key Press option in Triggers. If I spend significantly more development time on it, I can even make it count instances of repeated characters. This can work in some scenarios, but this presents at least two issues in most scenarios.
- If the word, phrase, or expression contains several repeated characters, the development time becomes problematic and more prone to error.
- No ability to check for the correct characters. There is no option in Triggers capable of validating character entry (including spaces). For example, Storyline cannot determine if the user type SAND when they were required to type HAND in order to advance. It will simply recognize the D as the key press trigger and advance.
1 Reply
- HoneyTurnerCommunity Member
Give this a try. Instead of using the key stroke to change slides, you use it to change focus. This forces your user input to be saved to a variable so you can test it. If it passes the test, then trigger next slide. If not, put your focus back where your user was typing.
Create your text box: UserWord
Create an object. Move it off screen: Submit
Define a text variable with your saved word: goal
UserWord will already have a trigger: When UserWord loses focus Set TextEntry equal to the typed value
Create trigger: When UserWord loses focus Jump to slide next slide If TextEntry = variable goal Else: Set focus on UserWord
Create trigger: When the user presses D after clicking on UserWord Set focus on Submit
Related Content
- 11 months ago
- 3 months ago
- 9 months ago