Talking to NPC

Hi guys, I’m making a RPG game, but I don’t know how to develop what the player talk to NPC, like PM.
1

Which part exactly do you need help with? Interacting with an NPC? Drawing text to the screen? Selecting the correct dialogue to load?

2 Likes

Check out the example in this ancient post / the related article

There are many ways in which you can handle the lines of dialog / scripting. If you want something very simple you can just have lists of text. If you want to be able to script elements in the game then the coroutine approach can be very helpful.

https://github.com/britzl/defold-richtext has functionality for easily truncating text while also being able to do special effects with your game’s text.

5 Likes

I’d like to know how to interact with NPC.

I’ll look into it, thx.