Page 1 of 2

Dialogue newbie - point-and-click interface

Posted: Wed Nov 20, 2024 8:10 pm
by SleepyOwl
Hello! I'm messing around with a point-and-click project using the Dialogue System. I have it set up and was able to get my test conversation to start on Play, but now I'm doing something else.

In this project, everything is done through the mouse through point-and-click. There's no character movement, and I'm not quite able to extrapolate how to get that to work with the Selector system. It's probably something stupidly simple and I'm missing something.

Workflow:
Scene loads -> click on NPC sprite to initiate dialogue.

Do I still need to use collider triggers for this, or is it actually much simpler and I'm overlooking something obvious? Thanks!

Re: Dialogue newbie - point-and-click interface

Posted: Wed Nov 20, 2024 8:46 pm
by Tony Li
Hi,

The Dialogue System Extras page has a 2DSelectorExample scene (direct download) that might work the way you want.

It has two sprites that you can click on. The one on the left has a Usable component and relies on the player's Selector. The one on the right uses a UI Button. Both of them have a Dialogue System Trigger, and interaction calls the Dialogue System Trigger's OnUse() method. (For the one on the left, make sure you've ticked the Welcome Window's USE_PHYSICS2D checkbox to enable the Dialogue System's 2D support.) A tip for the one on the left: If you want, you can configure the Usable component's OnSelect() and OnDeselect() events to highlight the sprite somehow -- for example, by turning on an outline effect, or increasing the brightness of the sprite, etc.

Some other alternatives are, on the low level end, to call DialogueManager.StartConversation() directly in C#. And on the very high level end, you could use the excellent Adventure Creator as your whole game framework. The Dialogue System has integration with it, and many popular Adventure Creator games use the Dialogue System for their conversations.

Re: Dialogue newbie - point-and-click interface

Posted: Wed Nov 20, 2024 10:09 pm
by SleepyOwl
Hi Tony! Thanks. I did find your post from 2021 addressing a similar issue and downloaded the test scene - that works find so now I'm trying to figure out the difference between my scene build and yours. I'll download the one you linked as well and try that out and see where my build is incorrect. Thanks for the fast reply!

Re: Dialogue newbie - point-and-click interface

Posted: Wed Nov 20, 2024 10:31 pm
by SleepyOwl
Got it! All set, thank you. :) Can't wait to see what this system can do.

Re: Dialogue newbie - point-and-click interface

Posted: Thu Nov 21, 2024 7:10 am
by Tony Li
Glad to help! If any other questions come up, don't hesitate to ask here on the forum.

Re: Dialogue newbie - point-and-click interface

Posted: Thu Nov 21, 2024 3:41 pm
by SleepyOwl
I did have another question. :)

I've set up my dialogue to use one panel for PC and NPC conversations. I also have the "continue button" option set to Always, and this is great. However, at the end of the conversation, I have to click Continue / press Space twice to get out of the dialogue window. I've spent some more time looking around but can't quite figure out why it's behaving this way. I've attached a screenshot of my current setup. Thank you!

Re: Dialogue newbie - point-and-click interface

Posted: Thu Nov 21, 2024 3:44 pm
by Tony Li
Hi,

Can you delete that last, empty dialogue entry node?

If not, then inspect it, click the "+" next to the Sequence field, and select Continue > Simulate Continue Button Click. This will add a Continue() command to the sequence field that will automatically continue past the entry without having to click again.

Re: Dialogue newbie - point-and-click interface

Posted: Thu Nov 21, 2024 3:56 pm
by SleepyOwl
The one thing I didn't think to try! Thank you again sir, I greatly appreciate the quick response! :D

Re: Dialogue newbie - point-and-click interface

Posted: Thu Nov 21, 2024 11:24 pm
by SleepyOwl
I'm playing around with some portrait ideas, using the stock basic UI.

Currently I have the portraits set up to show up on one side of the screen and swap out depending on who is talking. This is fine. I'd like to try and get the PC's portrait on one side of the screen, and the NPC on the other side, but I haven't been able to figure out how to get this to work. They share a common subtitle panel, so all of the conversations are in the same place.

In addition, I'm trying to animate the portrait image itself to slide in from the side of the frame, like in River City Girls 2, but when I try to add on an animator component it only allows me to adjust the Z position.

In the attachment, I'm just working with the single portrait, which again, works great when swapping out character portraits.

I tried going through the VN template but couldn't retrofit it to work with my setup.

Re: Dialogue newbie - point-and-click interface

Posted: Fri Nov 22, 2024 12:11 am
by SleepyOwl
Update! I was able to get the portraits to move in and out, so that's cool. Just need to figure out an elegant way to have the NPC on the other side without breaking it.