Page 2 of 4
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Posted: Thu Jan 05, 2023 9:23 am
by ChaChaCHAT
Yes, I have a dialogue manager on the scene, the trigger is set to onUse, there's no condition and no error. It's a really basic setup.
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Posted: Thu Jan 05, 2023 9:39 am
by Tony Li
From what you've described, that will work. As a test, if you manually set up a Dialogue System Trigger in the inspector (instead of through code), does it work correctly?
If the inspector-configured Dialogue System Trigger works, then we can narrow down the issue to the code.
If the inspector-configured Dialogue System Trigger doesn't work, then the issue is elsewhere, such as the dialogue UI. In this case, temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. This will log activity. Make sure the Dialogue System Trigger logs that it is firing, and that the conversation logs that it is starting.
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Posted: Thu Jan 05, 2023 10:56 am
by ChaChaCHAT
Ok I've tried the info debug mode like you said, really useful, didn<t know it was there! So the onUse Method is being fire by the trigger, so it may be the UI. Seems it doesnt move the panel, the panel stays off also, and the conversation seems to not be given to the ui. the dialogue manager is refenrencing the good ui script.
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Posted: Thu Jan 05, 2023 11:50 am
by Tony Li
Hi,
Do you see a log like this?
Dialogue System: Starting conversation 'title' with actor=X and conversant=Y
If so, then the trigger is trying to start the conversation. If this is the case, check the dialogue UI.
If you do not see that log, then the trigger is not starting the conversation.
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Posted: Thu Jan 05, 2023 12:11 pm
by ChaChaCHAT
yes, i see it, but i noticed that when i click the button the npc start a conversatin with himself?
says this : Dialogue System: Starting conversation 'xyz', actor=npc (UnityEngine.Transform), conversant=npc (UnityEngine.Transform). So now it is Fixed, i put the player transofrm, but ui still doesnt move to location and it stays desactivated any idea why? Fun fact Everythin works when using onStart.....
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Posted: Thu Jan 05, 2023 1:15 pm
by Tony Li
Does the Console contain any error or warning messages?
Is the correct UI assigned to the Dialogue Manager's Display Settings > Dialogue UI field?
Remember that VR UIs must be in Screen Space - Camera or World Space canvases. VR cannot render Screen Space - Overlay canvases. See the example VR scenes on the Dialogue System Extras page for examples.
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Posted: Thu Jan 05, 2023 1:26 pm
by ChaChaCHAT
Yes eveything is set up like in the example scene. Fun Fact eveything works when using onStart... but not onUse....
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Posted: Thu Jan 05, 2023 1:50 pm
by Tony Li
When you use OnUse, does it log "Dialogue System: Starting conversation..."?
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Posted: Thu Jan 05, 2023 1:53 pm
by ChaChaCHAT
yes it does
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
Posted: Thu Jan 05, 2023 2:16 pm
by ChaChaCHAT
Im also having another weird bug, when using onStart, even tho the database is set on mine, it will play Sergent Private Heart audio on my dialogue... the audio source is automaticlly added to my npc. ihave no reference at all or condition or anything set on that...