-
Notifications
You must be signed in to change notification settings - Fork 11
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
wait tag #56
Comments
If a wait tag is added similar to this then an action tag should be added too <action=sound:ding/> then these actions can be listened to within timer.delay(), and acted upon when using the truncate feature in games like visual novels. The action:name can be totally arbitrary and up to the project to deal with as it appears. |
The wait tag is interesting but feels a bit too game specific. Maybe a "repeat" tag that will repeat the enclosed text one or more times? Or maybe it should be possible to specify a callback function which will be invoked when an unknown tag is encountered while parsing the text. This would allow developers to handle game specific tags while parsing text. The "action" tag is also quite interesting. The tag could trigger a callback function which would allow developers to react to these actions/events when encountered. |
Callback function methods would be cool as a way to define custom tag behavior / react to action tags. What I am doing in my project is using Broadcast to signal the data that is then used elsewhere. Playing sounds / animations / screen effects as certain text passes by.
|
Another example of how I'm using action tag, when this text is truncated a particlefx is positioned on the char and plays to give an effect to make that text more special.
|
For the repeat tag I was thinking like this:
|
That would work well. Then any tags that overlap would also be applied and repeat on the repeated text? |
I added this tag to a custom version of RichText for my needs in a visual novel style project. It would probably be useful for others but I'm not sure if it should be a part of the main project. These are the main changes.
Then the tag is used like
<wait=30>
which inserts 30 zero width characters. This is useful in visual novel projects where you have text appearing once character at a time and you want to add small delays between actions.The text was updated successfully, but these errors were encountered: