Originally posted by Cinebeast
View Post
Announcement
Collapse
No announcement yet.
Blueprint Dialogue System
Collapse
X
-
Originally posted by Grogger View PostMake sure the return node is called and that it returns a UI_Dialogue_TextItem reference (if you inherit your new text item from UI_Dialogue_TextItem, you can return it)You can e-mail me at cinebst@gmail.com.
Comment
-
Originally posted by Cinebeast View PostThere's the problem -- my custom text item inherited from nothing. So, I want to make a fresh widget and parent it to UI_Dialogue_TextItem, but how would I change the font? I'm not sure which function I need to override, if any.
Comment
-
Originally posted by Grogger View PostThe only way I know of to change the font is in your text item, select the text block widget and set the font there in the Appearance panel
I've also tried duplicating UI_Dialogue_TextItem and changing the font there, then parenting it to the original widget, but I get the same error.You can e-mail me at cinebst@gmail.com.
Comment
-
Originally posted by Cinebeast View PostI know how to change the font on a widget, but I want to change the font for a widget that inherits from UI_Dialogue_TextItem. I've tried making a fresh widget and doing so, but I get an error on compile, since the text is already a variable. I want to override that variable, or replace it or something. I'm really not sure.
I've also tried duplicating UI_Dialogue_TextItem and changing the font there, then parenting it to the original widget, but I get the same error.
A small note is that if/when you update to the newer version (once it's available), you may have to fix your inherited widgets to call the new GetTextControl function.
Hope this helps!
Comment
-
Originally posted by Brum_ View PostHi Panda & HInoue,
Since I'm having the same problems you guys are having regarding packaging, I was wondering if you found a solution, or are waiting for 4.11 to be released?
My solution for this was to essentially disconnect all the macros and return the default value. For what it's worth, this pretty much just disables vibration and color options at runtime.
I'm not sure if we'll be using 4.11, so I'm probably going to end up creating a Function with the same inputs and logic as the macros and replacing them in the blueprints, as a Wildcard Array Input is only unsupported in a macro.
Comment
-
Originally posted by Grogger View PostWith what you have now, you will need to change the base UI_Dialogue_TextItem class to have this getter for all references to the txtText widget. (Most, if not all of these references reside in the one widget, so it's not too damaging).
A small note is that if/when you update to the newer version (once it's available), you may have to fix your inherited widgets to call the new GetTextControl function.
Hope this helps!You can e-mail me at cinebst@gmail.com.
Comment
-
Hi there, I just bought this dialogue system and so far it's been working as intended.
I've run into a simple problem. I can't get the conditions in the branches to work. I've read the previous post about putting in "variableName==true" in the condition box but it seems to automatically set the "variableName" to true rather than check for it even if I've set it to false in the script handler.
Basically, I have a part where you speak to an NPC, choosing dialogue option A will set a boolean to true, while B will set it to false. Then the next time you speak to the NPC, dialogue option C will be visible if the boolean is true, otherwise option C is hidden.
Where am I supposed to put the variables? At the moment they are non-local variables in my Dialogue component. Am I not accessing it right? Or do I need to put the variables somewhere else?
EDIT: PLEASE DISREGARD IMAGE, IT WAS FOR A PREVIOUS ISSUE THAT IS NOW SOLVED.Last edited by Loose_Moose; 02-29-2016, 08:09 AM.
Comment
-
Originally posted by Grogger View PostA small update:
* The system now supports unlimited responses (yay!)
* A new embedded scripting system is underway, which I will use extensively for inline function calls, conditionals, and other types of scripted functions within the text.
I am pretty excited about this new embedded script system. It really streamlines the dialogue and quest writing process to be able to do things like this in the text:
(Contrived example)
At any rate, things are going great and I will keep updating as I make progress!Name Text PostAction Condition INTRO_Hello Hi there $user@name$, nice to meet you! IntroBot@VisitCount = 1; IntroBot@VisitCount < 1 INTRO_HelloAgain Hello again $user@name$, nice to see you! You have visited me $IntroBot@VisitCount$ times! IntroBot@VisitCount += 1; IntroBot@VisitCount >= 1 && IntroBot@IsHappy INTRO_HelloAgainAngry Hello again $user@name$...you have visited me $IntroBot@VisitCount$ times. I am still angry with you! IntroBot@VisitCount += 1; IntroBot@VisitCount >= 1 && !IntroBot@IsHappy
Comment
-
Originally posted by Loose_Moose View PostHi there, I just bought this dialogue system and so far it's been working as intended.
I've run into a simple problem. I can't get the conditions in the branches to work. I've read the previous post about putting in "variableName==true" in the condition box but it seems to automatically set the "variableName" to true rather than check for it even if I've set it to false in the script handler.
Basically, I have a part where you speak to an NPC, choosing dialogue option A will set a boolean to true, while B will set it to false. Then the next time you speak to the NPC, dialogue option C will be visible if the boolean is true, otherwise option C is hidden.
Where am I supposed to put the variables? At the moment they are non-local variables in my Dialogue component. Am I not accessing it right? Or do I need to put the variables somewhere else?
Hi Loose_Moose, sorry for the delay (the forums decided I didn't need an email update on this...)
Hmm, my test cases are passing this scenario. I imagine the quotes aren't in the actual script? (just checking)
The script assumes that everything that is not 0 or false to be true, and if a variable isn't set to be a string literal (which is always true), if that helps at all?
Comment
-
Originally posted by LadyTerror08 View PostI'd really appreciate if someone could explain where to declare variables like VisitCount. I'm trying to set up a similar system to this but I can't get my Condition to see any variable I make in the blueprints. Is there a special place to make them or a special way to call them?
There is no way to read blueprint variables from the script, the ScriptInterpreter stores it's own variables to be used in the script. You can use your inherited dialogue component's GetScriptInterpreter function and using it's SetVariable function to add/edit variables from blueprint, or in the dialogue tables use the assignment operator "=" to do the same (eg. MyVariable = "Hello World".
In the upcoming update there will also be a way to delete the variables or test them to see if they exist.
Hope that helps
Comment
-
Hey thanks, I figured it out eventually haha. I didn't understand the system fully.
However, now I have an even simpler problem... in the text for my dialogues, how can I insert a new line? So it appears like this.
Data Log
110: Anomaly detected.
111: Data sent.
112: Memory wiped.
Or something like that. Thanks!
Comment
-
Originally posted by Loose_Moose View PostHey thanks, I figured it out eventually haha. I didn't understand the system fully.
However, now I have an even simpler problem... in the text for my dialogues, how can I insert a new line? So it appears like this.
Data Log
110: Anomaly detected.
111: Data sent.
112: Memory wiped.
Or something like that. Thanks!
As for the new line, I'm sorry to say it's not currently directly possible. My thought was to parse the text for a [/br] tag and replace it with an empty text element with the length of the remaining line, but this is surprisingly tricky
Comment
-
Originally posted by Grogger View PostGlad you figured it out!
As for the new line, I'm sorry to say it's not currently directly possible. My thought was to parse the text for a [/br] tag and replace it with an empty text element with the length of the remaining line, but this is surprisingly tricky
Comment
-
Originally posted by Loose_Moose View PostHey thanks, I figured it out eventually haha. I didn't understand the system fully.
However, now I have an even simpler problem... in the text for my dialogues, how can I insert a new line? So it appears like this.
Data Log
110: Anomaly detected.
111: Data sent.
112: Memory wiped.
Or something like that. Thanks!Originally posted by Grogger View PostThinking on this a bit more, it could be much simpler if I dynamically add multiple wrap boxes (with at least one item to force the height). I'll be looking into this soon, I'd really like to have this option. [Note though that I think this would be a slight breaking change, for custom UI_Dialogue setups]
This should be in the next update. I'm just waiting for 4.11 to test and release on
Comment
Comment