Dialogue tags save its start position, remove itself, and its function/behaviour is called in DialogueLabel when the character is drawn/displayed at that position.
▼
Hi there!{wait = 0.6} Welcome to...
Pos: 10
▼
Hi there! Welcome to...
This works fine, even with lots of tags. The problems comes when theres a variable in the text:
21
▼
Hi there, {player}! {wait = 0.6}Welcome to...
Hi there, {player}! Welcome to...
▼
Hi there, John! Welcome to...
▼
Hi there, Christopher! Welcome to...
The position remain unchanged, when its formatted. (Might be worse with BBCode too).
Currently looking for a way to offset these, using their positions and length difference of 'before' and 'after' the text is formatted.
One quick 'fix' is to just format the text before applying the tags.
Dialogue tags save its start position, remove itself, and its function/behaviour is called in
DialogueLabel
when the character is drawn/displayed at that position.This works fine, even with lots of tags. The problems comes when theres a
variable
in the text:The position remain unchanged, when its formatted. (Might be worse with BBCode too).
Currently looking for a way to offset these, using their positions and length difference of 'before' and 'after' the text is formatted.
One quick 'fix' is to just format the text before applying the tags.