Hi all,
I’ve just started using NC’s dialogue tree for a project I’m working on. I’ve got it working with no issues at all (hurray!), however I’m wondering on what a ‘best case’ scenario might be to handle multiple actors. At present I’ve got two different npc’s, both of which have their own identities, so when you talk to either one it should trigger a different dialogue set for each (depending on who you speak to first).
Is it a simple case of getting the current actor that you’re speaking with, then checking against their ID and just starting a conversation chain depending on who it is?
I wanted to make sure that there wasn’t an obvious and better solution to the issue, being so new to it and all.
Sorry for the late reply!
If you are referring to branching the dialogue depending on which NPC the player interacts with, then I think the best solution would be to use the “Task Condition” or “Multiple Task Condition” node to branch the dialogue based on some condition, which could be (like you said) a custom condition that checks which actor the player is currently interacting with.
Another (probably easier) solution would of course also be to just create a different Dialogue Tree altogether for each NPC the player can interact with (and as such a different conversation). Doing this, it will then be just a matter of starting the correct Dialogue Tree object as opposed to trying branching one Dialogue Tree into different directions.
Please let me know if that is what you are referring to, or if I completely misunderstood your question.
Thanks!
Hi Gavalakis!
Thanks for your reply. At present I’ve gone with the first idea, and created a sub tree that goes off to other conversations which seems to work pretty well. So I have a ‘root’ that figures out who you’re talking to in that particular scene, then goes from there.
I’ve attached a screenshot to outline the gist of what I’ve done, do you think this is an adequate solution?