It works with On Trigger Enter, too. Here are some things to check:
The NPC has a trigger collider.
The NPC's Dialogue System Trigger is set to OnTriggerEnter, and Condition > Accepted Tags is set to Player.
The player GameObject is tagged Player.
The player GameObject has a collider. (If it's using MotionController, it should have colliders.)
Here's how I tested it in the example scene:
Inspected Private Hart.
Added a Sphere Collider. Ticked Is Trigger. Set Radius to 2.
Set the Dialogue System Trigger to OnTriggerEnter. Clicked the "Add 'Player' Tag" button.
Played the scene. Walked up to Private Hart. The conversation started, and the player stopped correctly.
Re: about DialogueSystemMotionControllerBridge
Posted: Wed Jul 18, 2018 2:16 pm
by claudius_I
Hi
worked well in the demo, but in my project don't work
if you look this video
the trigger work well, but the character still moving, but add the tag the trigger don't work
Re: about DialogueSystemMotionControllerBridge
Posted: Wed Jul 18, 2018 2:42 pm
by Tony Li
Hi,
The video is unavailable.
Temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. Then play the scene and start the conversation. The Console log will show a line like this:
Dialogue System: Starting conversation 'TITLE' with actor=XXX and conversant=YYY
Make sure the player is listed in XXX or YYY. Maybe a different GameObject is triggering the conversation, such as a child GameObject of the player.
Also, inspect the player. Make sure it has a Motion Controller component, a Dialogue System Motion Controller Bridge component, and the bridge component's Disable Controls checkbox is ticked.
If you get stuck, please feel free to email a copy of your project to tony (at) pixelcrushers.com.
Re: about DialogueSystemMotionControllerBridge
Posted: Wed Jul 18, 2018 2:53 pm
by claudius_I
Hi
thanks for the answer
Tony Li wrote: ↑Wed Jul 18, 2018 2:42 pm
Make sure the player is listed in XXX or YYY. Maybe a different GameObject is triggering the conversation, such as a child GameObject of the player.
yeah. a child of player was triggering (i use also a Inventory Pro and a player _TriggerHandler is the trigger player)
but this gameobject is created runtime how can i fix this to use the collider with the tag player?
Claudio
Re: about DialogueSystemMotionControllerBridge
Posted: Wed Jul 18, 2018 3:20 pm
by Tony Li
Is the _TriggerHandler also tagged Player? If so, I can suggest three solutions:
1. Assign the player GameObject to the Dialogue System Trigger's Start Conversation > Actor field. This is the easiest solution. Whenever the Dialogue System Trigger fires, it will always involve the player GameObject, even if a different GameObject triggered it.
2. Or put _TriggerHandler on a different layer that won't register collisions with the NPC's collider.
3. Or assign the player GameObject to the Dialogue System Trigger's Condition > Accepted GameObjects list.
Re: about DialogueSystemMotionControllerBridge
Posted: Fri Jul 20, 2018 12:55 pm
by claudius_I
Thanks.
I have a new problem.
my npc have 2 dialogue system trigger (1. on use 2. on conversation end)
the conversation showed without problem, but on conversation end the action don't worked.
i tried with show alert and onexecute. don't worked.
Re: about DialogueSystemMotionControllerBridge
Posted: Fri Jul 20, 2018 1:34 pm
by Tony Li
Hi Claudio,
Only the Dialogue Manager GameObject and the two primary participants will receive "On Conversation End" messages.
Temporarily set the Dialogue Manager's Debug Level to Info. When you start a conversation, the Dialogue System will log:
Dialogue System: Starting conversation 'TITLE' with actor=XXX and conversant=YYY
Only the Dialogue Manager, XXX, and YYY will receive "On Conversation End" messages, so the second Dialogue System Trigger must be on one of these GameObjects.
Inspect the Dialogue System Trigger that is set to OnUse. Make sure its Conversant field is set to your NPC GameObject or is None.
If that doesn't help, please feel free to send me an example scene. I'll be happy to take a look.
Re: about DialogueSystemMotionControllerBridge
Posted: Fri Jul 20, 2018 2:05 pm
by claudius_I
Tony Li wrote: ↑Fri Jul 20, 2018 1:34 pm
Inspect the Dialogue System Trigger that is set to OnUse. Make sure its Conversant field is set to your NPC GameObject or is None.
Thanks. this was the problem. i copied this from another npc
another problem i have is when rotate the camera with the mouse many times active a conversation. where i can deactivate this?
Re: about DialogueSystemMotionControllerBridge
Posted: Fri Jul 20, 2018 2:39 pm
by Tony Li
Hi,
claudius_I wrote: ↑Fri Jul 20, 2018 2:05 pmanother problem i have is when rotate the camera with the mouse many times active a conversation. where i can deactivate this?
I don't know how to reproduce this. Is your Dialogue System Trigger set to OnTriggerEnter? If so, maybe it triggers when the camera enters the trigger collider. If this is the case, make sure the Dialogue System Trigger's Conditions > Accepted Tags is set only to "Player". And make sure the camera is tagged MainCamera, not Player.