Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline conditions in Text Events #2142

Open
bhiltune opened this issue Mar 15, 2024 · 0 comments
Open

Inline conditions in Text Events #2142

bhiltune opened this issue Mar 15, 2024 · 0 comments

Comments

@bhiltune
Copy link

Currently there's no way to write inline conditions, meaning that you can't write a single Text Event and have the text within it vary based on different conditions and variable states. You have to make a wholly separate Text Event with the changes you want and check against a variable before showing it.

So essentially, the following Text Event is currently not possible:
stalwart_guide: Wow! That was a close one... [if {Condition.AlmostDied} == true](We almost died!)

(In the above case, the intended result is to only show the "We almost died!" suffix if the condition is true.

While it's possible to work around this, it's a bit annoying, especially when writing longer Text Events. This sort of functionality would make the system a lot more flexible in regards to variable dialogue, especially when dealing with very minor changes to the final text based on niche conditions, for example. IMO this would also fit in very well with the current options such as randomizing text and using variable names/values as text.

I'm not immediately sure how this could be implemented, but Godot's String class has a handy function called Replace that could potentially work pretty well for something like this?

In any case, this isn't a critical issue, but it would be a significant workflow improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants