Skip to content

What would be the best way to extend the editor to allow you to modify text via code in a text event, similar to a Twine macro? #1110

Answered by ii4y-studios
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

Dialogic 1.x doesn't have any way to do that in timelines. Dialogic 2.0 does allow more complex calculation formulas for conditionals, but I don't think right now we have it able to do evaluations like that for setting the variables, but we could probably add it though.

Outside of that, for both 1.x and 2.0 you could also directly do the math in scripts out of a timeline, update another variable there. So in the script set the value of like [totalSeen] to the values of [dogsSeen] and [catsSeen], then in the timeline for the text its just "You saw [totalSeen] animals".

You could use a Signal or a Call Node timeline event to call a Godot script function to do all your updates for both that,…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@ghost
Comment options

@ii4y-studios
Comment options

@ghost
Comment options

@Jowan-Spooner
Comment options

Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants