Page 1 of 2

Auto-Arrange Nodes function to Script

Posted: Fri Sep 23, 2022 12:01 pm
by SBSun
I want to automatically run the Auto-Arrange Nodes function along with the Conversation creation in Script, is there a way?

Re: Auto-Arrange Nodes function to Script

Posted: Fri Sep 23, 2022 12:17 pm
by Tony Li
Hello,

Do you mean that you want to always auto-arrange after adding a new node?

Re: Auto-Arrange Nodes function to Script

Posted: Fri Sep 23, 2022 10:49 pm
by SBSun
Yes, that's right!

Re: Auto-Arrange Nodes function to Script

Posted: Sat Sep 24, 2022 2:51 am
by SBSun
I found this way!

I'm going to add self talk to Enemy's FSM feature right now.

Enter() when entering each state, Update() every frame, and Exit() when exiting are executed.

Enter : Execute self-talk 1 when entering state

Update : Executing self-talk at regular intervals during State execution

Exit : Executes self-talk once when escaping from the state

corresponding to each Enter, Update, and Exit.
You want to know how to effectively structure a conversation when you have EnterDialogueTextList, UpdateDialogueTextList, and ExitDialogueTextList.


A photograph is a conversation in one of many states. Currently, only Entry corresponding to Enter has been created.

At Enter, one of those entries is randomly output and it has to go to Update, but I ask a question because it would be too complicated if I gave each entry in Enter a link to the entries in Update.

Re: Auto-Arrange Nodes function to Script

Posted: Sat Sep 24, 2022 9:04 am
by Tony Li
> Update : Executing self-talk at regular intervals during State execution

If you control the intervals, then you can have 3 conversations. For example, title them:
  • AwareSet/Enter
  • AwareSet/Update
  • AwareSet/Exit
I used forward slashes ( / ) to group them into a submenu.

On Enter, start the conversation "AwareSet/Enter".

On your regular interval, start the conversation "AwareSet/Update".

On Exit, start the conversation "AwareSet/Exit".

Note: It is probably better to run these as barks, not conversations.

Re: Auto-Arrange Nodes function to Script

Posted: Sat Sep 24, 2022 9:32 am
by SBSun
How do you group?

Re: Auto-Arrange Nodes function to Script

Posted: Sat Sep 24, 2022 9:38 am
by Tony Li
What kind of group?

If you want to group conversation titles into a submenu, use forward slashes in conversation titles. For example, you could title your conversations:
  • Companions/Robot Butler/At Your Service
  • Companions/Robot Butler/Malfunction
  • Desert/Scavenger
  • Desert/Scorpion Herder
  • Jungle/Shaman, etc.
This will group them into submenus "Companions", "Desert", and "Jungle" in the Dialogue Editor, making it much easier to select conversations. The "Companions" submenu will have a sub-submenu for "Robot Butler".

To make visual groups of a selection of nodes in a conversation, see Dialogue Entry Node Groups:

Image

Re: Auto-Arrange Nodes function to Script

Posted: Sun Sep 25, 2022 3:05 am
by SBSun
Are you referring to the submenu you are talking about menuText?

And is there a way to add Entry to GroupEntry in Script

Re: Auto-Arrange Nodes function to Script

Posted: Sun Sep 25, 2022 3:50 pm
by Tony Li
I mean this:

conversationTitleSubmenus.png
conversationTitleSubmenus.png (15.25 KiB) Viewed 327 times

> And is there a way to add Entry to GroupEntry in Script

Yes. Two ways:

1. Preferred way: Add the link from the Group entry to the regular entry at design time. Set Conditions on the regular entry. When you want to make that entry available, set values so the Conditions are true:

conditions.png
conditions.png (30.8 KiB) Viewed 327 times

2. Alternate way: 1. Tick the Dialogue Manager GameObject's Other Settings > Instantiate Database. This way your script will only make runtime changes; it won't make permanent changes to the database. Then find the Group entry in DialogueManager.masterDatabase, and add a Link object to its outgoingLinks list.

Re: Auto-Arrange Nodes function to Script

Posted: Tue Sep 27, 2022 1:30 am
by SBSun
Thank you for answer! As in the first picture, Conversation was created by dividing Enter, Update, and Exit, and Entry was also created.

Now, I tried to set the lower entries at random and control the end of the conversation with a script, but the sequence doesn't seem to work, so I ask a question!

If you look at the 2nd and 3rd pictures, I wrote commands in the Sequence, but they don't work in-game. Is the Sequence not working in Start and End Entry?

Finally, is there a way to forcefully end a conversation during a conversation?