This week I spent most of my time implementing the “background dialogue”. It works rather OK, but there are many small problems with the script that determines how close player is to certain NPC.
I decided to make the background dialogue work like this. NPCs will do their thing and if you come close enough to them, they will tell you something simple depending on your stats and other things. Things like “hi. How are you.” or “Thanks for helping me earlier.”. You will also be able to hear other people conversing if you get close.
This proximity script can also be used for enemies. They will just walk around and patrol certain area. If you get too close, they will start chasing you. If you run far enough, they will stop chasing you. Simple stuff like that.
This is how it looks right now. Talking NPC has speech bubble above their head and their mouths move. You can see their dialogue at the top of the screen. You can move freely while other NPCs are talking so you can stay and listen to them or just walk away and they will stop talking. Simple, but it should make the world feel much more alive.
The script itself works fine, but it has some strange limitations. I managed to work around them and the whole thing now works ok, but it still needs some minor tweaking.