Page 5 of 6
Re: Dialogue System for Unity with plyGame
Posted: Fri May 12, 2017 10:41 pm
by davidsibya08
Is there a way that I could sort by ID inside the group quest all the quest in the complete quest log?
Re: Dialogue System for Unity with plyGame
Posted: Sat May 13, 2017 1:01 am
by Tony Li
Hi David,
davidsibya08 wrote:I have a quest item that will be disabled if a certain quest entry is not yet active,
but when it is active it does not become active though I think I provided the right
set of codes/blocks. When I paused the game and set the object to active then plays
the game back, it does not set any quest/quest entry state to its expected state.
It says:
[Flow/Comparison/a = b] in [Hermit Fendrel's Hammer/State 0/On AreaTrigger Enter]: Could not compare the values.
Why are these not function so well?
The On Start is working good.
The Update is not at all.
The AreaTriggerEnter Event is not working well also.
These are the blocks I made.
ask3.png
Try converting "Get the state of quest" and "Get the state of quest...entry" to Strings, such as:
You can also use the "Debug" block to print the current state to the Console window to double-check that it's the state you expect.
davidsibya08 wrote:Is there a way that I could sort by ID inside the group quest all the quest in the complete quest log?
Not without customizing the quest log window script. By default, they're sorted alphabetically by name.
Re: Dialogue System for Unity with plyGame
Posted: Sat May 13, 2017 1:35 am
by davidsibya08
Sir Tony,
You haven't read my previous post Sir Tony,
Sir Tony,
It still doesn't add anything to my attributes. I wonder what is causing the problem.
I tried all things possible but it still remain as it is. -_-
My option is do do scripting in terms of rewarding the player, I wanted to execute the script after completing the quest.
But is that possible? After I complete the conversation I execute the script that rewards item and attributes.
If so, you know exactly what I need to do.
Thank you Sir Tony.
As a String works for me now, thanks Sir Tony.
Is that possible to fix sir? Or should just number my quests arrangements?
Re: Dialogue System for Unity with plyGame
Posted: Sat May 13, 2017 10:38 am
by Tony Li
davidsibya08 wrote:My option is do do scripting in terms of rewarding the player, I wanted to execute the script after completing the quest.
But is that possible? After I complete the conversation I execute the script that rewards item and attributes.
Put the script in the dialogue entry node where the player completes the quest. The plyGameBridge component will apply the changes to your player at the end of the conversation.
For example:
- Dialogue Text: "Thank you for completing my quest."
- Script: Actor["Player"].Experience_CurrentValue = Actor["Player"].Experience_CurrentValue + 50;
ShowAlert("Gained 50 experience")
Depending on your version of the plyGame Support package, it should be "Experience_ConsumableValue" or "Experience.CurrentValue".
davidsibya08 wrote:Is that possible to fix sir? [Quest order]
Yes. Inspect each quest. Use numbers in the
Name field to specify how to sort the quests. For example:
- Name: 02 Forge Sword
- Name: 01 Mine Iron
- Name: 03 Defeat Dragon
This will sort the quests in the quest log window in this order:
- 01 Mine Iron
- 02 Forge Sword
- 03 Defeat Dragon
Then inspect each quest, tick the
Use Display Name checkbox, and set
Display Name to the name that you want to show in the quest log window. For example:
- Name: 02 Forge Sword, Display Name: Forge a Magical Sword
- Name: 01 Mine Iron, Display Name: Mine Iron Ore for a Sword
- Name: 03 Defeat Dragon, Display Name: Defeat the Evil Dragon with your Sword
Then the quest log window will show this:
- Mine Iron Ore for a Sword
- Forge a Magical Sword
- Defeat the Evil Dragon with your Sword
Re: Dialogue System for Unity with plyGame
Posted: Sat May 13, 2017 11:43 am
by davidsibya08
Hello Sir Tony,
First of all, Thank you very much for all your untiring support.
In regards with the script, what I meant back there is the C# Scripts.
Because I really don't get why my attributes in not updating so I wonder If I
could add a C# after the end of the dialogue node entry that will reward the Player.
Therefore, in that script I will set the rewards of the Player ( Maybe I would just make
a generic script for all).
By the way, the quest log window works great for sorting the Quest Titles.
Thank you very much Sir Tony.
Re: Dialogue System for Unity with plyGame
Posted: Sat May 13, 2017 12:16 pm
by Tony Li
If you want to add a C# script, you can add one with an
OnConversationEnd method. Look at plyGameBridge.cs's SyncLuaToPlyGame() method for an example of how to change plyGame values in your own scripts.
However, I recommend changing the values inside a conversation, since plyGameBridge does a lot of this work for you.
Re: Dialogue System for Unity with plyGame
Posted: Thu May 18, 2017 10:37 pm
by davidsibya08
Hi Sir Tony,
I don't really why it doesn't work on the Script field of the conversation but I figured out something worth trying for.
I just set up an empty game object on the radius of my NPC ( Hermit Fendrel) and provided a OnTriggerEnter and on LateUpdate condition which
states that if the Player completed the quest it will be rewarded with the following according to it's quest completed. It will be destroyed once all conditions inside the object are true.
I will ask you later if there are some errors or malfunctioning codes. Thank you Sir Tony!
Re: Dialogue System for Unity with plyGame
Posted: Fri May 19, 2017 6:24 pm
by davidsibya08
Hi Sir Tony,
Sir how do I put in my C# a method that identifies that the conversation started?
Re: Dialogue System for Unity with plyGame
Posted: Fri May 19, 2017 7:51 pm
by Tony Li
Hi David,
Add a method named "
OnConversationStart". Your script must be on the Dialogue Manager or the conversation's Actor or Conversant. Here's an example:
LogConversationStart.cs
Code: Select all
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class LogConversationStart : MonoBehaviour {
void OnConversationStart(Transform actor) {
Debug.Log("Conversation started: " + DialogueManager.LastConversationStarted);
}
}
There is also a
plyGame Event for OnConversationStart.
Re: Dialogue System for Unity with plyGame
Posted: Mon May 22, 2017 11:17 pm
by davidsibya08
Hi Sir Tony,
Sir how can I make this kind of dialogue/conversation?
Something like in this game, wherein the actor is the last giving the convo and when I clicked continue
it will show all my UIs that were hidden.
https://www.youtube.com/watch?v=qYOv_rw ... cBma7tDLQE
In addition, is it possible that a Unity GUI Button can be used to skip/continue conversation using plyBlox?