Hello! New version for UE 4.10 is available now! All subscribers will get an email with update. Also you can get it here
Hello, SlightlyLive!
If you want to create polylogue with cameras:
- create camera component variables for all cameras you need in blackboard
- set them in main service (to get access to cameras which in other bots, you should create varible in bot like âpartnerâ and set there another bot. It allows you to get his camera component in main service)
- in ShowPhrases node just set camera
2nd step is a little bit tricky but it works:)
For animations you should set skeletal mesh blackboard variable in main service, than in ShowPhrases set mesh and animation to play)
For conditionsâŚso itâs like IsTalking variable in my lessons. Again you should set a variable in blackboard and then in Behavior Tree create blackboard decorator, which will check your variable)
How would you store variables from the dialogue in save games game instance?
I wish you had thought of that :c and made a table for bool variables that can easily be savedâŚ
Dialogue System just extends the Behavior Tree. There are may be not only bool variables. It works the same way like AI.
Thanks for the tips. Iâll experiment and give them a shot. Much appreciated.
I want to set bool adn floats and stuff.
Scenario: I talk to an actor and after that a bool inside the actor gets toggled.
Scenario: I want to set an Bool inside the Player Character
Scenario: I want to set a floar inm the player character.
How do i address these actors and what task do i set up?
Hello, Kanizitas! Sorry for the delay. I didnât get a notification about new message here.
OK, to get access to all variables, methods of actor who talks to you:
- create new Behavior Tree Task (right click on asset browser -> new blueprint class -> BTTask_BlueprintBase)
- in this task create 2 nodes: Event Receive Execute and Finish Execute (check Success bool to true)
- from Owner Actor pin in Event Receive Execute node -> Cast to your dialogue controller
- from that cast -> Get Controlled Pawn - > Cast to your dialogue actor
Thatâs all you need. Result of cast is your actor. There you can get access to all his variables and methods: set them, get them, do whatever you want) - after all changes donât forget to set last pin to Finish Execute node)
- put this task in your Behavior Tree where you need it
Do the same to get access to the Player Character variables and methods:
- create new Behavior Tree Task (right click on asset browser -> new blueprint class -> BTTask_BlueprintBase)
- in this task create 2 nodes: Event Receive Execute and Finish Execute (check Success bool to true)
- create node Get Player Character ->Cast to your character
Thatâs all you need. Result of cast is your character. There you can get access to all his variables and methods: set them, get them, do whatever you want) - after all changes donât forget to set last pin to Finish Execute node)
- put this task in your Behavior Tree where you need it
Oh thank you :3 that worked so well!!!
Now i have a more serious matter.
I have a giant bunch of questbools:
Where can i store them all at once?
How can i lock certain dialog branches with bools? (Would mean if bool MQ_3_15 is not 1 the branch is not visible and not usable)
Hello, Kanizitas!
- You can create new blueprint class where you will store all your quest parameters, and place it into your character player (it allows to get access to all quest parameters where you need it and doesnât clutter up your character player)
- About hiding some branchesâŚWe can do it now, but not so easy as it should be:) Hope I found easiest way to solve this problem. So I decided to create update.
I will explain new features with update:)
Thank you, Kanizitas! You are helping me to improve this system!
Thx for the help
I had the idea that you were able to connect phrases to bools, if not connected to a bool it will be listed as default.
So every dialogue data would be connected to a boolstore blueprint.
And i hope i dont have to update my data now since the blueprints are already integrated into the gameplay⌠:c
My solution:
1. Every Question composite node will get a bool variable âVisibleâ that will be true by default
2. In QuestionGroup before âWait for an answerâ node create new BTTask
3. In task call âSet Question Visibilityâ node to set question visibility
All questions with name âQuestionToHideâ in **current **Question Group will be hiden. I think it give us more control:)
think of that:
We could connect the visibility state with a bool!
Now you just need to do it dynamic so that we dont need thousands of executes :c
Unfortunately, I donât understand you. What do you want to do dynamic? You have a bool variable which control visibility of a question. Now you just need to set it
There has to be a function set a bool and one to actually compare it for the question to not show.
But not for each bool! That would be a giant amount!
What do you mean âeach boolâ?) All questions are visible by default, if you want to hide one, you should just call âSet question visibilityâ with false new visibility. You donât need to set them all)
And if you want to not display all questions in question group you should add blackboard decorator to question group node. Quick example:
- I have 2 branches and a bool variable âBoolKeyâ in blackboard. If that bool is true then I want to show 1st branch else - 2nd
-
Right click on question group node -> add decorator -> blackboard
-
Settings for 1st decorator: Blackboard Key - itâs our bool. Key Query - Is Set = true. So if BoolKey == true we go to 1st branch
- Settings for 2nd decorator: Blackboard Key - itâs our bool. Key Query - Is Not Set = false. So if BoolKey == false we go to 2st branch
You can use it now, without update. Update need to set visibility of some questions in one question group.
Ok heres a scenario for you :3
Scenario:
I have two character.
If i speak first the first one i have two options.
After i toke option number one character two will have 3 dialogue questions.
If i took option one the second character would only have 2.
Seperate dialogue data.
Is that possible?
Yes, but now (without update) it will be cumbersome:
- When you chose 1st variant in 1st character set bool to true, 2nd variant - false
- In other dialogue tree, wich belong to 2nd character, create two question groups which are: 1st - with 3 questions, 2nd - just 2 questions
- Follow my instructions to create blackboard decorators in questions group to compare with bool that we changed in 1st step
After update we can create just one question group and change visibilisty of one question without creating decorators and extra question group.
Hello! New version is available to download! Now we can change question visibility by blueprint. All subscribers will get an email with update. Also you can get it here
The update was fine havent tried the new functions yet!
thx for the cool work !