Triggering Events While Typing
Last updated
Last updated
You're reading the documentation of an older/legacy version, Text Animator 1.X. To read the latest version, please visit this page insteadΒ . How to update:
Events are special tags that let you send messages (string) to any listener script, once the typewriter has reached a specific part of the text. (For this reason, events work only if the typewriter is enabled)
You can write events in your text by using rich text tags.
Event's messages are preceded by a question mark, like this: <?eventMessage>
.
Example: To call an event named 'shakeCamera', write: <?shakeCamera>
ππ» An event can have any kind of tag, including built-in effect's ones.
β οΈ Events are case sensitive. Writing <?camshake>
is not the same as writing <?camShake>
The scripts that you want listen to TextAnimator events/messages must subscribe to the onEvent
callback, inside the TextAnimator
class. (Scripting Api)
Example:
ππ» Note how the "message" string has no β<β, β?β and β>β characters, but only contains the message.