Today I did: NPC reacting to the player leaving in the middle of a conversation.
Back to my plan:
1) Conversation object which detects when player is near or not: DONE
2) Assign a simple linear script to the conversation, no special character animation, just lines: DONE
3) Make conversation ensure that all actors are summoned to it's area on conversation start: DONE
4) Character speaking direction changes according to who they are responding to: BUGGY
5) Generic interrupt section can be assigned to a conversation: DONE TODAY
6) Ability to insert specific interrupts on each line of conversation: not yet
Number 6 is going to be important to actually allow the player to say things to change the flow of the conversation. After that, the system will be functional for the game, although it's lacking a ton in polish.
Here is the conversation script shown in the GIF:
{"lines": [ ["mother","My poor boy. What is it?"], ["mother","I'm sorry your legs are hurting."], ["mother","Can't rest until the tracker says it's time."], ["mother","He says the danger is still out there."], ["mother","Considering what we have left, I believe it."] ], "walk_away":{"distance":100,"replace_lines":[ ["mother","It's ok if you don't talk to me, go explore."], ["mother","Just be safe, OK?"] ]} }
When the player walks at least 100 units away, the script switches to the lines defined by "replace_lines". When I implement step 6 though I'll be able to expand this dialog to allow the player to choose the conversation topic after the first line in response to the mother's question.