Hi, move my question from discord to here because I feel like I'll bother everyone by noob question. Information as follows :
1.My npc has Dialogue system trigger and Usable components
2.My player has Dialogue system events and Selector components
3.My player can interact with npc just fine with above setups.
4.I initiated my player on runtime so I dragging my player prefab from project to inspector.
5.This is log when conversation start (which I assumed correct)
Dialogue System: Starting conversation 'New Conversation 1', actor=MyPlayer (UnityEngine.Transform), conversant=MyGuide (UnityEngine.Transform).
UnityEngine.Debug:Log(Object, Object)
6.I use Top down engine with default setting
The problem is I can't trigger event on dialogue system event (in this case is SetActive to false)
But I have another working event system that I've setup the same way by dragging my player prefab from project to inspector.
What should I do ?
Dialogue system event does not trigger
Re: Dialogue system event does not trigger
Hi,
Why are you deactivating the player when a conversation starts that involves the player?
Also, make sure not to assign prefabs to inspector fields unless the inspector field is on the same prefab itself. For example, if you're editing a prefab, you can assign the prefab itself to its own Dialogue System Events > OnConversationStart() method.
However, if you have a Dialogue System Trigger in the scene, you should not assign the player prefab to its Actions > Start Conversation > Conversation Actor field. This is because, at runtime, the player instance will be the actor, not the player prefab.
Why are you deactivating the player when a conversation starts that involves the player?
Also, make sure not to assign prefabs to inspector fields unless the inspector field is on the same prefab itself. For example, if you're editing a prefab, you can assign the prefab itself to its own Dialogue System Events > OnConversationStart() method.
However, if you have a Dialogue System Trigger in the scene, you should not assign the player prefab to its Actions > Start Conversation > Conversation Actor field. This is because, at runtime, the player instance will be the actor, not the player prefab.
Re: Dialogue system event does not trigger
Thank you !! I just remove my player prefab from Actions > Start Conversation > Conversation Actor field. and it works !!
I just use deactivate as a simple test because it's obvious to see if the event trigger or not.
I just use deactivate as a simple test because it's obvious to see if the event trigger or not.
Re: Dialogue system event does not trigger
Happy to help! Glad it's working now.