Hey, all!
I'm trying to make a vanilla walk-around-and-talk-to-NPCs game, and I'm having trouble with the dialogue system. I've followed the arrays tutorial and have all of my dialogue lines (or test lines) stored in an array in my project, but that tutorial doesn't include ways to call multiple lines of dialogue in a "chain." For example, I'd like to do this:
(player presses spacebar while overlapping NPC)
NPC: What can I do for you?
(player presses spacebar again, which continues the conversation)
Player: Not much.
(player presses spacebar again, which continues the conversation)
NPC: Fine.
That's all—no choices, nothing too fancy, just pressing a button to get through a pre-written conversation.
As it is right now, I only understand how to have my player sprite walk up to an NPC, press spacebar while overlapping, and get one line of dialogue from my array—not multiple lines of dialogue for a "full conversation." Is there a "Wait for key press" functionality or something that I can use within dialogue to allow the player to click/key press through?
I've looked at the "Zelda Dialogue System" example as well as the "Dialogue Box for Lazy People", but I can't quite understand how their "go_to_next" function works—which I think is the function they're using to make dialogue appear in sequence?
As a disclaimer, I know next to nothing about programming—all of my shaky understanding has come from tutorials and some experience in the Quest Text Adventure engine.
A link to my game, if it helps.