How do I pause after an NPC dialogue line until a condition is met?

0 favourites
  • 6 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • Hi all,

    I am working on a language game where an NPC will tell you how to say a word and then you will say it into the microphone and validate you are pronouncing it correctly.

    I want to prevent the dialogue from continuing on until the word is validated. I am able to read into the voice input and check it, but am having trouble stopping the dialogue at that point. I tried to introduce a "signal" and a sub even seen here to just stop the user from advancing the dialogue but it didnt work.

    What am I dong wrong?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I don't think you need that signal. Aside from that we don't know what you are doing with 'PronunciationCorrect'. It needs to be set to false to allow the waiting, if it's always true then this logic won't work.

  • I don't think you need that signal. Aside from that we don't know what you are doing with 'PronunciationCorrect'. It needs to be set to false to allow the waiting, if it's always true then this logic won't work.

    hi Lionz, thanks for the help.

    To give more context: You speak with an NPC, you get to Array slot 2 where they ask you to try to pronounce a word. At this point I want to validate the user can correctly pronounce the word so I am reading in from the voice input their pronunciation and checking if its correct.

    Thats why I am trying to do some subevent at Array value 2 to prevent continuation until this step is met, so that seems like an easy boolean condition until something is true. I tried to use Signals but I dont think I am doing it correctly, but not sure what else to do....

  • Yes I understood all this, my point is that we can't see what you are doing with that variable. It should be set to false before they pronounce, then set it to true when they do. None of this is in the screenshot. Then when pronouncecorrect is true it will go to the next bit of dialogue. If that variable is set to true then it will go straight to the next bit of dialogue without the pronounce. So you don't need these extra bits like signal. Also what is the outcome at the moment when you try it ?

  • Yes I understood all this, my point is that we can't see what you are doing with that variable. It should be set to false before they pronounce, then set it to true when they do. None of this is in the screenshot. Then when pronouncecorrect is true it will go to the next bit of dialogue. If that variable is set to true then it will go straight to the next bit of dialogue without the pronounce. So you don't need these extra bits like signal. Also what is the outcome at the moment when you try it ?

    yes you totally right, I forgot to show that I have PronunciationCorrect as a Global Variable set to False.

    Currently if you do the dialogue to "You try it" and you say the word correctly it will go to "Great Job". But if you are at "You try it" and press e it will advance to Great Job which I don't want to happen.

    I removed the signal and am only turning PronunciationCorrect true once the word is said correctly. So I am trying to figure out how to freeze at that You Try it now by disabling advancing by hitting "e"

  • Ok so as I suspected, it is working. To block out the E press you can do it a few ways, probably the best way is to add a condition appletext_index=0, this way it is blocked out until you do a reset later and set it back to 0 for a new bit of dialogue.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)