How to add an Action to a DialogueSystemTrigger componenet threw scripting
-
- Posts: 24
- Joined: Mon Aug 01, 2022 7:58 am
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
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
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.
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.
-
- Posts: 24
- Joined: Mon Aug 01, 2022 7:58 am
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
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
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.
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.
-
- Posts: 24
- Joined: Mon Aug 01, 2022 7:58 am
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
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.....
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.....
Last edited by ChaChaCHAT on Thu Jan 05, 2023 1:25 pm, edited 1 time in total.
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
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.
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.
-
- Posts: 24
- Joined: Mon Aug 01, 2022 7:58 am
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
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
When you use OnUse, does it log "Dialogue System: Starting conversation..."?
-
- Posts: 24
- Joined: Mon Aug 01, 2022 7:58 am
-
- Posts: 24
- Joined: Mon Aug 01, 2022 7:58 am
Re: How to add an Action to a DialogueSystemTrigger componenet threw scripting
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...