Question mark and Dialogue System

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Demonith
Posts: 28
Joined: Mon Jun 29, 2015 10:13 am

Question mark and Dialogue System

Post by Demonith »

Hey i was wondering how to make a question mark to a character with When he have a quest and when is done to show exclamation mark above head i use RPG Kit
User avatar
Tony Li
Posts: 20769
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question mark and Dialogue System

Post by Tony Li »

Hi,

Here are the steps:

1. Create a world space UI above the character's head. Make it a child GameObject of the character.

2. Add a "Look At Main Camera" component.

3. Add UI Images for question mark and exclamation mark to the canvas.

The easiest way to do steps 1-3 is to copy the "UI" GameObject from RPG Kit's example "Spell Conversation" character in the "Main Level" scene. This has a UI with an exclamation mark Image. Rename the Mark to Exclamation. Add a similar image for the question mark, and rename it Question. Set them both inactive.

4. In your conversation, when you want to show the question mark, use this Sequence:

Code: Select all

SetActive(MyNPC/UI/Question)
where "MyNPC" is the name of your NPC.

If you want to hide the question mark and show the exclamation mark, use this Sequence:

Code: Select all

SetActive(MyNPC/UI/Question, false);
SetActive(MyNPC/UI/Exclamation)

Notes:
  • If you don't have images handy, you can use UI Text for the Question and Exclamation elements.
  • You can add Animator components to the Question and Exclamation elements and animate them -- for example, make them pulse by changing the size +/- 25%.
User avatar
Demonith
Posts: 28
Joined: Mon Jun 29, 2015 10:13 am

Re: Question mark and Dialogue System

Post by Demonith »

Awesome as always tnx :D will check it out :)
User avatar
Demonith
Posts: 28
Joined: Mon Jun 29, 2015 10:13 am

Re: Question mark and Dialogue System

Post by Demonith »

Can u tell me how to make url text in dialogue ? when player click it to open website ?
User avatar
Tony Li
Posts: 20769
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question mark and Dialogue System

Post by Tony Li »

Demonith wrote:Can u tell me how to make url text in dialogue ? when player click it to open website ?
Unity's UI system doesn't provide any built-in capability to do this. Here are some options:

1. Use TextMesh Pro. It's a paid product, but it's really good. You can watch the video tutorial on embedding URLs here.

2. Or, if you're using Unity UI, replace the Subtitle Line's Text component with the InteractableText component here.
User avatar
Demonith
Posts: 28
Joined: Mon Jun 29, 2015 10:13 am

Re: Question mark and Dialogue System

Post by Demonith »

Tony Li wrote:Hi,

Here are the steps:

1. Create a world space UI above the character's head. Make it a child GameObject of the character.

2. Add a "Look At Main Camera" component.

3. Add UI Images for question mark and exclamation mark to the canvas.

The easiest way to do steps 1-3 is to copy the "UI" GameObject from RPG Kit's example "Spell Conversation" character in the "Main Level" scene. This has a UI with an exclamation mark Image. Rename the Mark to Exclamation. Add a similar image for the question mark, and rename it Question. Set them both inactive.

4. In your conversation, when you want to show the question mark, use this Sequence:

Code: Select all

SetActive(MyNPC/UI/Question)
where "MyNPC" is the name of your NPC.

If you want to hide the question mark and show the exclamation mark, use this Sequence:

Code: Select all

SetActive(MyNPC/UI/Question, false);
SetActive(MyNPC/UI/Exclamation)

Notes:
  • If you don't have images handy, you can use UI Text for the Question and Exclamation elements.
  • You can add Animator components to the Question and Exclamation elements and animate them -- for example, make them pulse by changing the size +/- 25%.
I was thinking is there a way to make a 3d like rotation over head like Exclamation mark or Question mark
User avatar
Tony Li
Posts: 20769
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question mark and Dialogue System

Post by Tony Li »

Yes, you can add an Animator component to the world space UI and animate it. I'll try to put an example of this in the updated RPG Kit Support package.
User avatar
Demonith
Posts: 28
Joined: Mon Jun 29, 2015 10:13 am

Re: Question mark and Dialogue System

Post by Demonith »

Tony Li wrote:Yes, you can add an Animator component to the world space UI and animate it. I'll try to put an example of this in the updated RPG Kit Support package.
Well its 3.1.2 now u can make example today :) or tomorrow
User avatar
Tony Li
Posts: 20769
Joined: Thu Jul 18, 2013 1:27 pm

Re: Question mark and Dialogue System

Post by Tony Li »

Demonith wrote:
Tony Li wrote:Yes, you can add an Animator component to the world space UI and animate it. I'll try to put an example of this in the updated RPG Kit Support package.
Well its 3.1.2 now u can make example today :) or tomorrow
I'll try to make it available as soon as possible. I'm working as fast as I can on the next update. ;)
User avatar
Demonith
Posts: 28
Joined: Mon Jun 29, 2015 10:13 am

Re: Question mark and Dialogue System

Post by Demonith »

Tony Li wrote:
Demonith wrote:
Tony Li wrote:Yes, you can add an Animator component to the world space UI and animate it. I'll try to put an example of this in the updated RPG Kit Support package.
Well its 3.1.2 now u can make example today :) or tomorrow
I'll try to make it available as soon as possible. I'm working as fast as I can on the next update. ;)
Awesome take your time :) cant wait to see new things :)
Post Reply