Why doesn't this method of dialogue progression work?

0 favourites
  • 4 posts
From the Asset Store
Dialogue System Template
$3.78 USD
30% off
Create complex dialogues with ease with this tool/template!
  • First off, hi! I'm new here. I've been futzing around with Construct 3, working on my first small game for a game jam...as part of that, I'm trying to do a very short cutscene at the start of the game that would be like 4 or 5 lines of dialogue. The goal is to have the player press space to progress to the next line.

    Because of the relative simplicity of it, I was trying to find a way to do this with conditions versus using an array...I set a condition of "when space has been pressed AND global variable is equal to number" and then set typewriter text and set the variable to the next highest number and make that a condition for the next line of dialogue, rinse and repeat.

    What happens on playing is that it runs the first line of dialogue (before the instance variables kick in) and then when I hit space, the instance variable jumps up by 3 or 4 and fires the last dialogue in the list, skipping over the ones in between.

    Here's a screenshot of the conditions event sheet:

    From what I've read, the actions should fire sequentially, right? I was wondering if maybe the first press of the space button was simultaneously plowing through the other "set line to 1, set line to 2" actions, but that doesn't seem right.

    Knowing this method probably only works for really narrow cases like this and that I'll need to learn a more robust dialogue system going forward, any idea why this doesn't work? Thank you in advance!

  • Your suspicion is correct, and the logic is correct. The appropriate logic is to catch On space pressed, and then use subevents, with Else to break down the number.

  • Ah! I had tried Subevents from the single space condition, but had NOT tried breaking out the changing of variable to an Else statement. That did the trick. Thank you, blackhornet!

    For posterity, in case anyone else runs into the same issue, here's the structure that worked:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is closer to what meant.

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