Search found 60 matches

by DrewThomasArt
Tue Mar 19, 2024 3:00 pm
Forum: Dialogue System for Unity
Topic: Calling Method From A Scriptable Object in Conversation
Replies: 5
Views: 547

Re: Calling Method From A Scriptable Object in Conversation

Hi, Your code is fine as long as the correct GameObject is being used as the speaker. Add a Debug.Log to show the value of the speaker property. It's probably the wrong value. See Character GameObject Assignments . I also tried using "GameObject.Find" to get the exact NPC instead of using...
by DrewThomasArt
Tue Mar 19, 2024 12:24 am
Forum: Dialogue System for Unity
Topic: Calling Method From A Scriptable Object in Conversation
Replies: 5
Views: 547

Re: Calling Method From A Scriptable Object in Conversation

Hi, I recommend writing a custom sequencer command . You can use the properties 'speaker' and 'listener' to refer to the GameObjects associated with the dialogue entry's actor (speaker) and conversant (listener) so you don't need to reference anything by GameObject name. Then you can get GetCompone...
by DrewThomasArt
Sun Mar 17, 2024 2:44 am
Forum: Dialogue System for Unity
Topic: Calling Method From A Scriptable Object in Conversation
Replies: 5
Views: 547

Calling Method From A Scriptable Object in Conversation

I'm integrating the system with Suriyun's MMORPG Kit, and I'm trying to get the Accept/Decline Quest UI to pop up after certain dialogue nodes by using sequencer commands. I've seen posts on using "SendMessage(B,,MyGameObject)" and "SendMessage(B,,listener)" , but I'm wondering h...
by DrewThomasArt
Thu Apr 13, 2023 10:42 pm
Forum: Dialogue System for Unity
Topic: Saving Inventory Between Scenes (Scriptable Objects)
Replies: 5
Views: 696

Re: Saving Inventory Between Scenes (Scriptable Objects)

The example code is meant to be a model, not play-ready code. You'll need to fill in some things based on your specific inventory implementation. There are at least two things you may want to change: Change this line: var inventory = GetComponent<InventorySO>(); to: var inventory = GetComponent<Inv...
by DrewThomasArt
Thu Apr 13, 2023 10:12 am
Forum: Dialogue System for Unity
Topic: Saving Inventory Between Scenes (Scriptable Objects)
Replies: 5
Views: 696

Re: Saving Inventory Between Scenes (Scriptable Objects)

Thank you, RecordData() is now functioning, This is my ApplyData() method: public void ApplyData(string s) { if (string.IsNullOrEmpty(s)) return; // If this isn't valid save data, skip. var inventory = GetComponent<InventorySO>(); var saveData = SaveSystem.Deserialize<InventorySaveData>(s); if (sav...
by DrewThomasArt
Wed Apr 12, 2023 11:28 pm
Forum: Dialogue System for Unity
Topic: Saving Inventory Between Scenes (Scriptable Objects)
Replies: 5
Views: 696

Saving Inventory Between Scenes (Scriptable Objects)

Hello, I've mastered saving serializable things like ints and strings using the method in this Pixel Crushers tutorial: https://pixelcrushers.com/phpbb/viewtopic.php?f=9&t=4763 I've been stuck for a few days on saving my inventory though. I'm trying to use this method from the tutorial: public c...
by DrewThomasArt
Mon Apr 10, 2023 10:40 pm
Forum: Dialogue System for Unity
Topic: How to Open and Close the Quest Log from Script
Replies: 3
Views: 424

Re: How to Open and Close the Quest Log from Script

Hi, Try this: var questLogWindow = FindObjectOfType<QuestLogWindow>(); if (questLogWindow.isOpen) questLogWindow.Close(); else questLogWindow.Open(); Also, I recommend duplicating the quest log window prefab and using the duplicate. This way you won't accidentally overwrite your customizations if y...
by DrewThomasArt
Mon Apr 10, 2023 9:31 pm
Forum: Dialogue System for Unity
Topic: How to Open and Close the Quest Log from Script
Replies: 3
Views: 424

How to Open and Close the Quest Log from Script

Hi, I edited the Basic Prefab Quest Log Window from the Dialogue Manager prefabs, and I need to program buttons in my game's UI to open and close the Quest Window so the player can click through the UI's other windows. I tried this because I read it on the Quests documentation, but it's not working,...
by DrewThomasArt
Sun Apr 09, 2023 9:33 am
Forum: Dialogue System for Unity
Topic: Way to Disable Starting a Conversation with a Window Open?
Replies: 3
Views: 448

Re: Way to Disable Starting a Conversation with a Window Open?

Hi, If the player can only trigger Usable components using a Selector or Proximity Selector component, you can disable the Selector/Proximity Selector when windows are open. If the player can trigger Dialogue System Triggers in other ways, you can make and use a subclass of DialogueSystemTrigger th...
by DrewThomasArt
Sun Apr 09, 2023 8:02 am
Forum: Dialogue System for Unity
Topic: Way to Disable Starting a Conversation with a Window Open?
Replies: 3
Views: 448

Way to Disable Starting a Conversation with a Window Open?

I want to disable the ability to start conversations when things like shops and inventory pages are open. Is there a simple way to do this? I was thinking about doing something like disabling "usable" component on all objects with "NPC" tag when opening windows, but I'm thinking ...