So, I'm considering adding NPC dialogue into my game, and I'm wondering if the following is possible:
- You walk up to the NPC and press a button to start the dialogue.
- The NPC states their dialogue.
- A Yes/No option shows up (like in any RPG/Undertale/etc), and you can move between the two or Press Y or N to indicate a decision.
- Yes causes a variable within the player's KinematicBody2D script to change (like increasing attack strength, speed, etc). If this is accomplished via signals or singletons, I could really use an explanation on how those would work.
I personally haven't found any tutorials that focus on variable modification and branching dialogue options (most are just one line of text from an NPC and then the dialogue ends). Are there any that you may know of and could link, or any example (code or in-depth explanation for a beginner to GDScript) that would accomplish the goals listed above? I'm sure the answer is out there, but I've just barely begun with Godot (first serious, non-tutorial game) so I don't know the coding language quite so well yet.
Any help would be greatly appreciated! Thank you!
-Lost in Spaghetti