Auto-Arrange Nodes function to Script

Announcements, support questions, and discussion for the Dialogue System.
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Auto-Arrange Nodes function to Script

Post by SBSun »

I want to automatically run the Auto-Arrange Nodes function along with the Conversation creation in Script, is there a way?
Attachments
캡처.PNG
캡처.PNG (19.09 KiB) Viewed 351 times
User avatar
Tony Li
Posts: 21972
Joined: Thu Jul 18, 2013 1:27 pm

Re: Auto-Arrange Nodes function to Script

Post by Tony Li »

Hello,

Do you mean that you want to always auto-arrange after adding a new node?
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Re: Auto-Arrange Nodes function to Script

Post by SBSun »

Yes, that's right!
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Re: Auto-Arrange Nodes function to Script

Post 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.
Attachments
제목 없음.png
제목 없음.png (77.8 KiB) Viewed 337 times
User avatar
Tony Li
Posts: 21972
Joined: Thu Jul 18, 2013 1:27 pm

Re: Auto-Arrange Nodes function to Script

Post 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.
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Re: Auto-Arrange Nodes function to Script

Post by SBSun »

How do you group?
User avatar
Tony Li
Posts: 21972
Joined: Thu Jul 18, 2013 1:27 pm

Re: Auto-Arrange Nodes function to Script

Post 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
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Re: Auto-Arrange Nodes function to Script

Post 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
Attachments
캡처.PNG
캡처.PNG (115.2 KiB) Viewed 321 times
User avatar
Tony Li
Posts: 21972
Joined: Thu Jul 18, 2013 1:27 pm

Re: Auto-Arrange Nodes function to Script

Post by Tony Li »

I mean this:

conversationTitleSubmenus.png
conversationTitleSubmenus.png (15.25 KiB) Viewed 320 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 320 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.
SBSun
Posts: 46
Joined: Thu Sep 08, 2022 6:39 pm

Re: Auto-Arrange Nodes function to Script

Post 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?
Attachments
1.png
1.png (118.38 KiB) Viewed 308 times
2.PNG
2.PNG (111.32 KiB) Viewed 308 times
3.PNG
3.PNG (98.47 KiB) Viewed 308 times
Post Reply