Page 1 of 3

Question mark and Dialogue System

Posted: Sun Nov 29, 2015 3:11 pm
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

Re: Question mark and Dialogue System

Posted: Sun Nov 29, 2015 3:27 pm
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%.

Re: Question mark and Dialogue System

Posted: Sun Nov 29, 2015 4:16 pm
by Demonith
Awesome as always tnx :D will check it out :)

Re: Question mark and Dialogue System

Posted: Sun Dec 06, 2015 7:54 pm
by Demonith
Can u tell me how to make url text in dialogue ? when player click it to open website ?

Re: Question mark and Dialogue System

Posted: Sun Dec 06, 2015 9:49 pm
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.

Re: Question mark and Dialogue System

Posted: Sat Dec 19, 2015 10:36 am
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

Re: Question mark and Dialogue System

Posted: Sat Dec 19, 2015 10:52 am
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.

Re: Question mark and Dialogue System

Posted: Sat Dec 19, 2015 11:25 am
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

Re: Question mark and Dialogue System

Posted: Sat Dec 19, 2015 12:12 pm
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. ;)

Re: Question mark and Dialogue System

Posted: Sat Dec 19, 2015 1:17 pm
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 :)