OnUse() don't work in my 2D game

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22159
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnUse() don't work in my 2D game

Post by Tony Li »

Hi,
DryreL wrote: Sat Aug 21, 2021 4:17 amCursor visibility while Dialogue active
If your character has a WeaponAim component, it may be showing the cursor. The Dialogue System Extras page already has an updated integration package to handle this. It's in the "Updated for 2.2.18" foldout. If you import the updated package, tick the ConversationZone component's Pause While Talking checkbox.
DryreL wrote: Sat Aug 21, 2021 4:17 amZoom in/out while Dialogue active
Are you sure priority 3 is high enough to supercede other vcams? Also, remove the third parameter ('1'). The third parameter should either be 'cut' or nothing.
DryreL wrote: Sat Aug 21, 2021 4:17 amWord wrap
Here's an example in Corgi:

DS_CorgiLimitWidthAndPlayerMenu_2021-03-10
User avatar
DryreL
Posts: 29
Joined: Sat Dec 26, 2020 1:58 pm

Re: OnUse() don't work in my 2D game

Post by DryreL »

Hi,

I'm really happy to see your help!
Tony Li wrote: Sat Aug 21, 2021 9:15 am If your character has a WeaponAim component, it may be showing the cursor. The Dialogue System Extras page already has an updated integration package to handle this. It's in the "Updated for 2.2.18" foldout. If you import the updated package, tick the ConversationZone component's Pause While Talking checkbox.
I downloaded both DS_CorgiLimitWidthAndPlayerMenu_2021-03-10 and DS_CorgiSupport_2021-08-21. Then I realized that cursor visibility problem was related to my player gameobject. It was really weird, there was no code related to cursor. I created my player gameobject from scratch and cursor visibility problem solved. I'm sorry for bothering you.
Tony Li wrote: Sat Aug 21, 2021 9:15 am Are you sure priority 3 is high enough to supercede other vcams? Also, remove the third parameter ('1'). The third parameter should either be 'cut' or nothing.
I set the priority 99 and remove the third parameter, still same.

Corgi Limit Width And Player Menu scene does not include Cinemachine. It has Regular Camera, which is old. Can you update the scene with removing Regular Camera gameobject, and adding MinimalCameraRig gameobject (childs: Regular Camera, CinemachineVirtualCamera, PostProcessingVolume) from the Corgi Engine's Minimal Level scene. It's updated version I guess..

Image

Then you can try to use zoom on sequencer. I didn't manage to do that...
Tony Li wrote: Sat Aug 21, 2021 9:15 am Here's an example in Corgi:

DS_CorgiLimitWidthAndPlayerMenu_2021-03-10
That's nice! Word wrap is working now for the NPC. But can you also make same thing for the Player menu? Because it also needs word wrap...

Image

By the way, npc dialogue and player response was in the same UI before, but now it's separated. It looks nice in the first place but if we have long response, it overlaps as in the preview.

Thanks in advance.
User avatar
Tony Li
Posts: 22159
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnUse() don't work in my 2D game

Post by Tony Li »

DryreL wrote: Sat Aug 21, 2021 12:13 pm[Cinemachine] I set the priority 99 and remove the third parameter, still same.
Are there any errors or warnings in the Console window? Did you enable the Dialogue System's Cinemachine integration? (Tools > Pixel Crushers > Dialogue System > Welcome Window, then tick USE_CINEMACHINE.)
DryreL wrote: Sat Aug 21, 2021 12:13 pmThat's nice! Word wrap is working now for the NPC. But can you also make same thing for the Player menu? Because it also needs word wrap...
You can set up the player menu the same way. Or you can put them all in one UI like the original example, using the same idea to set up word wrap.
User avatar
DryreL
Posts: 29
Joined: Sat Dec 26, 2020 1:58 pm

Re: OnUse() don't work in my 2D game

Post by DryreL »

Hi
Tony Li wrote: Sat Aug 21, 2021 3:28 pm Are there any errors or warnings in the Console window? Did you enable the Dialogue System's Cinemachine integration? (Tools > Pixel Crushers > Dialogue System > Welcome Window, then tick USE_CINEMACHINE.)
Yes, it's already active.
Image

Can you try to zoom using Cinemachine on sequencer? I couldn't do it...
Tony Li wrote: Sat Aug 21, 2021 3:28 pm You can set up the player menu the same way. Or you can put them all in one UI like the original example, using the same idea to set up word wrap.
I manage to do that, somehow.. and it works fine I guess. Just a question here, my player name isn't visible when I select a quote from response menu. It shows NPC name always. How can I do that?

Here's a video example.


If there's [A] button, it's a NPC dialogue, otherwise it's player dialogue (player dialogue close to ending of video).
Casey is NPC name. I cannot see the Player name. It makes confusing in the gameplay.

I tried to add Portrait Name (TMP) child object to Response Menu Panel child object's PC Name.
Image

It was empty. But adding it doesn't change it either. Any idea?

Thanks!
User avatar
Tony Li
Posts: 22159
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnUse() don't work in my 2D game

Post by Tony Li »

Hi,
DryreL wrote: Sat Aug 21, 2021 9:56 pmCan you try to zoom using Cinemachine on sequencer? I couldn't do it...
Here's an example:

DS_QuickCorgiCinemachineTest_2021-08-21.unitypackage
DryreL wrote: Sat Aug 21, 2021 9:56 pm[Response menu...] my player name isn't visible when I select a quote from response menu. It shows NPC name always. How can I do that?
I don't understand, but here's an example scene that alternates between NPC and player lines:

DS_CorgiBackAndForth_2018-09-30.unitypackage

I think you mean that the name in the NPC's subtitle panel is always the NPC's name. That's because it's the NPC's subtitle panel. In the example above, the player has its own subtitle. (You can also set up a player menu panel, but that scene doesn't do it.)
User avatar
DryreL
Posts: 29
Joined: Sat Dec 26, 2020 1:58 pm

Re: OnUse() don't work in my 2D game

Post by DryreL »

Hi,
Tony Li wrote: Sat Aug 21, 2021 10:46 pm Here's an example:

DS_QuickCorgiCinemachineTest_2021-08-21.unitypackage
Thanks, now it's fixed my problem.
Tony Li wrote: Sat Aug 21, 2021 10:46 pm I don't understand, but here's an example scene that alternates between NPC and player lines:

DS_CorgiBackAndForth_2018-09-30.unitypackage

I think you mean that the name in the NPC's subtitle panel is always the NPC's name. That's because it's the NPC's subtitle panel. In the example above, the player has its own subtitle. (You can also set up a player menu panel, but that scene doesn't do it.)
Yes, NPC's subtitle panel is always the NPC's name. Is there a way to show Player name in the NPC's subtitle panel? I checked the CorgiBackAndForth scene but player and NPC dialogues are seperated, that's not I want. What should I do?
User avatar
Tony Li
Posts: 22159
Joined: Thu Jul 18, 2013 1:27 pm

Re: OnUse() don't work in my 2D game

Post by Tony Li »

Hi,

When you set up a subtitle panel specifically for an actor (such as Dude 1), only that actor will use the subtitle panel, so only that actor's name will appear in it.

To do what you want, you must set up a dialogue UI. Here's an example scene:

DS_CorgiOverrideDialogueUIExample_2021-08-22.unitypackage

It's only slightly different from the main Dialogue System + Corgi example. It has these changes:
  • Added an instance of Basic Standard Dialogue UI to Dude 1's Conversation Zone canvas.
  • Removed its Dialogue Panel, and moved the bubble panel into the dialogue UI.
  • Assigned the bubble panel and its response menu to the Standard Dialogue UI component.
  • Set the Dialogue Actor component's Subtitle Panel Number and Menu Panel Number back to Default.
  • Added an Override Dialogue UI component that tells the Dialogue System to use this dialogue UI when talking to Dude 1.
User avatar
DryreL
Posts: 29
Joined: Sat Dec 26, 2020 1:58 pm

Re: OnUse() don't work in my 2D game

Post by DryreL »

Sorry for late answering and thanks! I'll let you know if I encounter a problem.
Post Reply