Hi,
I have been using the system recently, but I wanted to set up my own camera system. The system is very simple, when the player interacts with the NPC, an object activates to switch the camera to a new position. After the conversation, that object disables, switching the camera back to the third person view.
The problem is, I can not figure out how to disable that object after a certain point in the conversation.
How do you disable gameobjects when clicking on the last part of the conversation?
Disable After Certain Point in Dialogue
-
- Posts: 2
- Joined: Sat Jun 20, 2020 3:24 pm
Re: Disable After Certain Point in Dialogue
Hi
I am a noob at this asset so keep that in mind.
I clicked on a node in the Conversations tab; in the inspector view....
Sequence > click the plus button and inspect GameObject Drag-n-Drop > Default and Alt-key
May help - or it may be the wrong place for what you want to accomplish.
Danny
I am a noob at this asset so keep that in mind.
I clicked on a node in the Conversations tab; in the inspector view....
Sequence > click the plus button and inspect GameObject Drag-n-Drop > Default and Alt-key
May help - or it may be the wrong place for what you want to accomplish.
Danny
Jesus is the answer to every problem.
https://www.gotquestions.org/know-Jesus.html
https://store.steampowered.com/app/2151420/Word/ Longest typing game on Steam OO
https://www.gotquestions.org/know-Jesus.html
https://store.steampowered.com/app/2151420/Word/ Longest typing game on Steam OO
Re: Disable After Certain Point in Dialogue
Hi @TouchstoneBros -
danosono's on the right track. If you want to activate or deactivate a GameObject during a conversation, use the SetActive() sequencer command. There's a similar SetEnabled() sequencer command if you want to enable or disable a component on a GameObject.
More info: The Sequence field has some built-in shortcuts so if you drag certain types of objects (such as scene GameObjects) onto it, it will automatically create a sequencer command for you.
Alternatively, you can add a scene UnityEvent. Inspect the dialogue entry node, expand Events, and click Add Scene Event. This adds a UnityEvent that you can hook up in the inspector.
If you want to do something at the beginning and end of a conversation, add a Dialogue System Events component. Configure the OnConversationStart() event to activate your GameObject and OnConversationEnd() to deactivate it. The last part of the Interaction Tutorial shows how to do this on the player GameObject to disable the player's movement controls during conversations. But you could also add a Dialogue System Events to each NPC if you want to do something special with each NPC at the start and end of conversations with that NPC.
In addition, you can add Dialogue System Triggers that are set to OnConversationStart and OnConversationEnd to check conditions and then perform actions. This page has tables that explain which Gameobjects receive OnConversationStart and OnConversationEnd events.
danosono's on the right track. If you want to activate or deactivate a GameObject during a conversation, use the SetActive() sequencer command. There's a similar SetEnabled() sequencer command if you want to enable or disable a component on a GameObject.
More info: The Sequence field has some built-in shortcuts so if you drag certain types of objects (such as scene GameObjects) onto it, it will automatically create a sequencer command for you.
Alternatively, you can add a scene UnityEvent. Inspect the dialogue entry node, expand Events, and click Add Scene Event. This adds a UnityEvent that you can hook up in the inspector.
If you want to do something at the beginning and end of a conversation, add a Dialogue System Events component. Configure the OnConversationStart() event to activate your GameObject and OnConversationEnd() to deactivate it. The last part of the Interaction Tutorial shows how to do this on the player GameObject to disable the player's movement controls during conversations. But you could also add a Dialogue System Events to each NPC if you want to do something special with each NPC at the start and end of conversations with that NPC.
In addition, you can add Dialogue System Triggers that are set to OnConversationStart and OnConversationEnd to check conditions and then perform actions. This page has tables that explain which Gameobjects receive OnConversationStart and OnConversationEnd events.
-
- Posts: 2
- Joined: Sat Jun 20, 2020 3:24 pm
Re: Disable After Certain Point in Dialogue
Thank you for the help! That should be exactly what we were looking for! thanks for the quick response!
Re: Disable After Certain Point in Dialogue
Glad to help!