Hi
Is it possible to attach the actor to the Dialogue System Trigger -> Actions -> Start Conversation -> Conversation Actor via script?
Thanks!
[Solved] Attach actor via script
[Solved] Attach actor via script
Last edited by Japtor on Sun Nov 04, 2018 3:46 pm, edited 1 time in total.
Re: Attach actor via script
Hi,
Yes, you can set DialogueSystemTrigger.conversationActor. For example:
This assumes that you will set it before triggering the Dialogue System Trigger.
If you need to set it after triggering the Dialogue System Trigger, I can make two suggestions:
1. Leave the Conversation Actor field blank. If it's triggered by OnUse or OnTriggerEnter (or OnTriggerExit, OnCollisionEnter, or OnCollisionExit), it will automatically assign the GameObject that caused the trigger to fire.
2. Or manually change the values assigned to DialogueManager.conversationModel.actorInfo.
Yes, you can set DialogueSystemTrigger.conversationActor. For example:
Code: Select all
GetComponent<DialogueSystemTrigger>().conversationActor = someTransform;
If you need to set it after triggering the Dialogue System Trigger, I can make two suggestions:
1. Leave the Conversation Actor field blank. If it's triggered by OnUse or OnTriggerEnter (or OnTriggerExit, OnCollisionEnter, or OnCollisionExit), it will automatically assign the GameObject that caused the trigger to fire.
2. Or manually change the values assigned to DialogueManager.conversationModel.actorInfo.
Re: Attach actor via script
Hi,
Thanks! It worked!
Thanks! It worked!
Re: [Solved] Attach actor via script
Awesome! Happy to help.