Hi all, I just started using this system and I need to do something pretty basic but I can't find any examples for it. Please let me know if I'm missing anything. Here's what I want to do:
When a player selects a certain node in the conversation, I want to trigger a function that knows what the interacting game objects are (actor and conversant).
I've seen how to trigger a C# function from conversation nodes, but I don't see a way of passing the interacting game objects to that function.
I guess I could pass unique IDs and try to get the objects that way, but that seems inefficient and unnecessary since the conversation already knows who the conversant and actor are.
For context: I'm trying to make a simple interaction where a player can interact with an item and choose whether to inspect, take, or leave. (Players and items are spawned dynamically).
Trigger a function within a conversation that knows what the interacting gameobjects are
Re: Trigger a function within a conversation that knows what the interacting gameobjects are
Hi,
Your C# method can check DialogueManager.currentActor and currentConversant. Those will correspond to the conversation actor and conversant. Example:
You can also check the current dialogue entry's speaker and listener using DialogueManager.currentConversationState.subtitle.speakerInfo and listenerInfo.
Your C# method can check DialogueManager.currentActor and currentConversant. Those will correspond to the conversation actor and conversant. Example:
Code: Select all
public void TakeCurrentConversant()
{
YourInventorySystem.PickUpItem(DialogueManager.currentConversant);
}
Re: Trigger a function within a conversation that knows what the interacting gameobjects are
Thanks a lot for the response, that will do!