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
Get Forbidden Entry
Forbidden Entry
Stealth, rob 'em up
Status | In development |
Author | GameDev_byHobby |
Genre | Role Playing |
Tags | Crime, Singleplayer, Stealth |
More posts
- Day #30 End of JamApr 30, 2021
- Day #27 House stuffApr 27, 2021
- Day #26 House exterior and cameraApr 26, 2021
- Day #25 Inventory re-textureApr 25, 2021
- Day #24 Minor updatesApr 24, 2021
- Day #21 Finishing touches to dialogueApr 21, 2021
- Day #19 House InteriorApr 19, 2021
- Day #18 Starting Level DesignApr 18, 2021
- Day #16 Owner basic animationsApr 16, 2021
Leave a comment
Log in with itch.io to leave a comment.