Page 1 of 1
Dialogue system with Corgi engine question
Posted: Thu May 14, 2020 2:59 pm
by JP_team
hello, my name is Carlo, I am the lead developer of Judgement project, A metroidvania 2D game, in unity, we are using Corgi engine and Dialogue system for create the game,
right now we are working in a tutorial system, I have a few questions:
- how can I enable in middle of the dialogue the movements of the player if I have uncheck in the "Conversation Zone" script the option of "Can walk while talking" ?,because my idea is that the npc is teach the player the basic movements.
- can I reference in the dialogue test the Input key that we assigned in the input manager?
thank you for the help, this plugin is really useful for our project
here are some videos of the game.
https://www.youtube.com/channel/UCXZbdk ... NHqGro-mxQ
and check the facebook page for more info.
https://www.facebook.com/judgementproject/
Re: Dialogue system with Corgi engine question
Posted: Thu May 14, 2020 10:04 pm
by Tony Li
Hi,
JP_team wrote: ↑Thu May 14, 2020 2:59 pmhello, my name is Carlo, I am the lead developer of Judgement project, A metroidvania 2D game, in unity, we are using Corgi engine and Dialogue system for create the game,
Nice! They made a good combo. Thanks for sharing the videos!
JP_team wrote: ↑Thu May 14, 2020 2:59 pmhow can I enable in middle of the dialogue the movements of the player if I have uncheck in the "Conversation Zone" script the option of "Can walk while talking" ?,because my idea is that the npc is teach the player the basic movements.
The
Dialogue System Extras page has an updated integration package. In the middle of the dialogue, you can call the Conversation Zone's UndoDisallowMovement() method. You can write a custom sequencer command or:
1. Give the Conversation Zone GameObject a unique name such as "Charlie Conversation Zone"
2. Use the SendMessage() sequencer command, as in:
Code: Select all
SendMessage(UndoDisallowMovement,,Charlie Conversation Zone)
JP_team wrote: ↑Thu May 14, 2020 2:59 pmcan I reference in the dialogue test the Input key that we assigned in the input manager?
Set a DS variable. Example:
Code: Select all
using PixelCrushers.DialogueSystem; // Add to top of C# script.
...
DialogueLua.SetVariable("InputKey", "[A]");
In your Dialogue Text, use the [var=variable] tag:
- Dialogue Text: "Press the [var=InputKey] key."
Re: Dialogue system with Corgi engine question
Posted: Fri May 15, 2020 9:43 am
by JP_team
Tony Li wrote: ↑Thu May 14, 2020 10:04 pm
Hi,
JP_team wrote: ↑Thu May 14, 2020 2:59 pmhello, my name is Carlo, I am the lead developer of Judgement project, A metroidvania 2D game, in unity, we are using Corgi engine and Dialogue system for create the game,
Nice! They made a good combo. Thanks for sharing the videos!
JP_team wrote: ↑Thu May 14, 2020 2:59 pmhow can I enable in middle of the dialogue the movements of the player if I have uncheck in the "Conversation Zone" script the option of "Can walk while talking" ?,because my idea is that the npc is teach the player the basic movements.
The
Dialogue System Extras page has an updated integration package. In the middle of the dialogue, you can call the Conversation Zone's UndoDisallowMovement() method. You can write a custom sequencer command or:
1. Give the Conversation Zone GameObject a unique name such as "Charlie Conversation Zone"
2. Use the SendMessage() sequencer command, as in:
Code: Select all
SendMessage(UndoDisallowMovement,,Charlie Conversation Zone)
JP_team wrote: ↑Thu May 14, 2020 2:59 pmcan I reference in the dialogue test the Input key that we assigned in the input manager?
Set a DS variable. Example:
Code: Select all
using PixelCrushers.DialogueSystem; // Add to top of C# script.
...
DialogueLua.SetVariable("InputKey", "[A]");
In your Dialogue Text, use the [var=variable] tag:
- Dialogue Text: "Press the [var=InputKey] key."
thank you, I will try it and tell you if it work for me.
Re: Dialogue system with Corgi engine question
Posted: Fri May 15, 2020 5:41 pm
by JP_team
here is the work in progress of the tutorial https://drive.google.com/open?id=1JBzlm ... CEJCgsoc5w
I just have a few questions:
- I don't know why at the end of the sequence I can not active the inventory without trigger first the pause menu, I didn't touch any code of the GUI
- how can I change the draw order of the Basic Standard Dialogue UI, because for now I just move down the draw order of the main interface of the game.
- right now I am using this script in for check if the player is touching a collider 2D, when he move to the left, to the right and jump
Code: Select all
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TriggerNotification : MonoBehaviour
{
public string Message;
private void OnTriggerEnter2D(Collider2D collision)
{
PixelCrushers.DialogueSystem.Sequencer.Message(Message);
}
public void CallMessage(string s)
{
PixelCrushers.DialogueSystem.Sequencer.Message(s);
}
}
but I dont know if is a better option to set up the message when the player press the keybutton of each of that interactions.
- my final question is, I dont know why some times SetActive(gameObject, true) works but in other times, it doesnt work.
Re: Dialogue system with Corgi engine question
Posted: Fri May 15, 2020 8:21 pm
by Tony Li
Hi,
JP_team wrote: ↑Fri May 15, 2020 5:41 pm- I don't know why at the end of the sequence I can not active the inventory without trigger first the pause menu, I didn't touch any code of the GUI
Compare your scene to the integration's "Corgi Inventory Example" scene. Maybe you will see what's different in your scene that is causing the issue.
The ConversationZone's UndoDisallowMovement() method only re-enables movement. It doesn't re-enable Corgi's camera controller or Inventory Engine. If you need to also re-enable those, enable the CameraController and the InventoryInputManager:
Code: Select all
FindObjectOfType<CameraController>().enabled = true;
FindObjectOfType<InventoryInputManager>().enabled = true;
EventSystem.current.sendNavigationEvents = false;
JP_team wrote: ↑Fri May 15, 2020 5:41 pm- how can I change the draw order of the Basic Standard Dialogue UI, because for now I just move down the draw order of the main interface of the game.
Inspect the Dialogue Manager's Canvas. Change the Sort Order value.
JP_team wrote: ↑Fri May 15, 2020 5:41 pm- right now I am using this script in for check if the player is touching a collider 2D, when he move to the left, to the right and jump....
That's fine.
JP_team wrote: ↑Fri May 15, 2020 5:41 pm- my final question is, I dont know why some times SetActive(gameObject, true) works but in other times, it doesnt work.
Examine the Console window for any warnings. It will report if it doesn't find the GameObject. Make sure the spelling and capitalization are correct. If there are no warnings, make sure nothing else is keeping the GameObject inactive, or deactivating it after SetActive() activates it.
Re: Dialogue system with Corgi engine question
Posted: Sat May 16, 2020 3:56 pm
by JP_team
thank you @Tony Li, almost everything is finished, tomorrow I will try this part
Set a DS variable. Example:
CODE: SELECT ALL
Code: Select all
using PixelCrushers.DialogueSystem; // Add to top of C# script.
...
DialogueLua.SetVariable("InputKey", "[A]");
In your Dialogue Text, use the [var=variable] tag:
- Dialogue Text: "Press the [var=InputKey] key."
Re: Dialogue system with Corgi engine question
Posted: Sat May 16, 2020 4:08 pm
by Tony Li
Glad to help!
If you need to reference a sprite instead of the text name of a key, use TextMesh Pro. Then you can use TextMesh Pro's <sprite> tag:
- Dialogue Text: "Press the [var=InputKey] key."
You can even combine them:
Code: Select all
DialogueLua.SetVariable("InputKeySprite", "DPadUp_Sprite");
- Dialogue Text: "Press the <sprite name="[var=InputKeySprite]"> key."
Re: Dialogue system with Corgi engine question
Posted: Sun May 17, 2020 9:18 am
by JP_team
I can not try that right now, I have a weird bug with the text mesh pro, that I need to report, becuse it always show me a pop up that I need to install some package of text mesh pro, but have all the package for it install, and the option in the popup is disable.
Re: Dialogue system with Corgi engine question
Posted: Sun May 17, 2020 9:31 am
by Tony Li
Try deleting the TextMesh Pro folder. Then click the popup's button one more time.