Hello, I'm trying to have some more control over the text of responses without having to create another node as de conditions get quite a bit more complicated with multiple nodes. Something like this for example:
The response of cheese burritos may have different disabled text depending on different conditions:
I not have enough money: Text in red
If Paul is Angry: No cheese for you!
if no more cheese burritos: I'm out of cheese burritos!
What would be a good way to achieve this? Thank you
Dynamic response text
Re: Dynamic response text
Hi,
Personally, I think separate response dialogue entries would make the options more clear. That is, separate options for "Cheese burrito", "No cheese burritos for you" and "I'm out of cheese burritos".
However, if you want to keep it in one dialogue entry, you can use the Conditional() Lua function inside a [lua(code)] markup tag.
For example, set the Dialogue Text or Menu Text to:
Personally, I think separate response dialogue entries would make the options more clear. That is, separate options for "Cheese burrito", "No cheese burritos for you" and "I'm out of cheese burritos".
However, if you want to keep it in one dialogue entry, you can use the Conditional() Lua function inside a [lua(code)] markup tag.
For example, set the Dialogue Text or Menu Text to:
Code: Select all
[lua(Conditional(Variable["Paul.IsAngry"], "No cheese for you!"))]
[lua(Conditional(Variable["Burritos"] <= 0, "I'm out of burritos!"))]
[lua(Conditional(Variable["Money"] < 40 and Variable["Burritos"] >= 1 and not Variable["Paul.IsAngry"], "I don't have enough money"))]
-
- Posts: 31
- Joined: Fri Apr 10, 2020 2:30 am
Re: Dynamic response text
Hey, Thank you! that was what I was looking for!
In other cases I would keep those options separate but here having to keep only one visible and disabled It gets too cumbersome to manage the logic for each option for only having different text.
Thanks again!
In other cases I would keep those options separate but here having to keep only one visible and disabled It gets too cumbersome to manage the logic for each option for only having different text.
Thanks again!