using UnityEngine;
using PixelCrushers.DialogueSystem;
public class CodedText : MonoBehaviour
{
private UnityEngine.UI.Text text;
private string originalValue = string.Empty;
private void Awake()
{
text = GetComponent<UnityEngine.UI.Text>();
}
private void Start()
{
UpdateText();
}
public void UpdateText()
{
if (string.IsNullOrEmpty(originalValue)) originalValue = text.text;
text.text = FormattedText.ParseCode(originalValue);
}
}
It will update the text once when the GameObject starts. If you need to update it again, call the UpdateText() method. For example, you can rename the UI Text GameObject to a unique name such as "Money Count Value Text" and set a Sequence to:
I'm afraid it's too complicated for me. I’m not a coder – just a storyteller and a bit artist. Tried to apply new script component to a text panel, but failed. Guess, I have to find another way to display variables. Like separate conversation or something.
VN framework manual says it’s possible to show “to do” list with quest element. How may I do this inside VN framework? And may be this feature will help me to show variables to the player?
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class CodedText : MonoBehaviour
{
private UnityEngine.UI.Text text;
private string originalValue = string.Empty;
private void Awake()
{
text = GetComponent<UnityEngine.UI.Text>();
}
private void Start()
{
UpdateText();
}
public void UpdateText()
{
if (string.IsNullOrEmpty(originalValue)) originalValue = text.text;
text.text = FormattedText.ParseCode(originalValue);
}
}
It will update the text once when the GameObject starts. If you need to update it again, call the UpdateText() method. For example, you can rename the UI Text GameObject to a unique name such as "Money Count Value Text" and set a Sequence to:
pavsikakyj wrote: ↑Mon Jul 30, 2018 8:59 amI'm afraid it's too complicated for me. I’m not a coder – just a storyteller and a bit artist. Tried to apply new script component to a text panel, but failed. Guess, I have to find another way to display variables. Like separate conversation or something.
If you use that script, it doesn't require any coding. Save the script as "CodedText.cs". Then add it to a GameObject that has a Text component. If that doesn't work, please let me know how it's failing.
pavsikakyj wrote: ↑Mon Jul 30, 2018 8:59 amVN framework manual says it’s possible to show “to do” list with quest element. How may I do this inside VN framework? And may be this feature will help me to show variables to the player?
Yes. Here is one way to set it up:
1. Inspect the Dialogue Manager GameObject, and remove the Instantiate Prefabs component.
2. Add the prefab "Basic Standard UI Quest Log Window" to the Visual Novel Menu Canvas. You can deactivate its Main Panel child GameObject so you can see your other menu panels:
3. Add a "Quests" button. (You can label it whatever you want -- "Journal", "To Do List", etc.) Connects its OnClick() event to the Basic Standard UI Quest Log Window's Open() method:
This means you're probably calling the quest log window's Open method while the quest log window GameObject is inactive. You can leave this GameObject active. It will automatically hide its Main Panel at runtime, or you can set the Main Panel inactive at design time.
In version 2.0.3, this condition will no longer log an error, but it also won't show the quest log window if the GameObject is inactive.
Hi. Even if I make Quest Window visible, the error keeps appearing. When I press Quest Window button in the game, it actually freezes. Even main subtitle text stops. Nothing works.
I configured the buttonas you described.
After that I updated to 2.0.3. And now I can't change backgrounds for different conversation nodes ))). There is just blank screen and subtitles. Quest panel still doesn't work, but it doesn't freeze the game at least.
UPD. Also Continue button isn't shown in subtitle panel after update, even if it is visible.
pavsikakyj wrote: ↑Sun Aug 05, 2018 2:54 pmAfter that I updated to 2.0.3. And now I can't change backgrounds for different conversation nodes ))). There is just blank screen and subtitles. Quest panel still doesn't work, but it doesn't freeze the game at least.
UPD. Also Continue button isn't shown in subtitle panel after update, even if it is visible.
Does the VN Framework's "Example Start" game play correctly?
pavsikakyj wrote: ↑Sun Aug 05, 2018 2:54 pmAnd now I can't change backgrounds for different conversation nodes
Does your Dialogue Manager (in your start scene) have a Handle Background Fields component? Maybe this component got removed.
pavsikakyj wrote: ↑Sun Aug 05, 2018 2:54 pmWhen I press Quest Window button in the game, it actually freezes.
Untick the quest log window's Pause When Open checkbox. By default, the quest log window pauses the game when it's open.
It sounds like there are a few small configuration issues that are causing the problems. If you'd like to send your project to tony (at) pixelcrushers.com, I can take a look.
I updated VN Framework, added Handle Background Fields component to DM, and everything got back to normal state, except Quest Window )). How should I send a project? Save it as scene? Or copy windows folder and put it to archive?