Day #20 Dialogue System


I always wanted my own branching dialogue system where you could select different answers. I watched a few videos about how to do it, but never got around to it. Until today. I made a simple black box with a white border and threw a scene together in which you can set the text, the portrait and dialogue of the interacted character.

All of those change based on what you respond (and what's on the JSON file). Given you stick to the format I put together on the JSON file, you can have multiple lines, options to answer, and different branches for every answer. I wanted to add a repeat one-liner if you interacted again after finishing a dialogue but I was already tired and the code starting to spaghetti itself, so I scrapped it.

Then I tried to hook it up to the old man when you're close and press E, and it works but it never deletes the dialogue box. I think instead of deleting it I'll try to hide it.

All in all, it was a success. I took inspiration from all those videos, but I challenged myself to code it all myself without looking at those. The result may not be the best though. Regardless, I'm proud I could do it on my own.

Files

Day20.zip 4.8 MB
Apr 20, 2021
Day20Executable.zip 13 MB
Apr 20, 2021

Get Forbidden Entry

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.