Repository navigation
Documentation
Chitter().initialise(fontASSET, fontColour);Initialises Chitter.
The system creates sprites for each font asset.
| ARGUMENT | TYPE | DESCRIPTION |
|---|---|---|
_fontASSET |
Asset.GMFont | Base font |
_fontColour |
Constant.colour or Real | Base font colour |
[_soundASSET] |
Asset.GMSound | Base sound |
[_fontDrawEach] |
Bool | Set to true if using a non monospace font and/or using font_swap tag |
Using a non monospace font draws each letter
at a time compared to the the alternative.
As such it uses more resources.
Add name, modified string, and sprite of the speaker to a queue system.
| ARGUMENT | TYPE | DESCRIPTION |
|---|---|---|
_id |
string | Queue ID |
_speaker_name |
String | String name of speaker |
_speaker_string |
String | String or modified string of the speaker. |
[_speaker_sprite] |
Asset.GMSprite | Sprite asset of speaker |
Examples:
The substring "blue" will draw in a blue colour.
Chitter().add("0_0", "Maklore", "Here is a [colour : #0000ff]blue[] colour.");You can also use multi-line string literals.
Chitter().add("0_0", "Maklore",@"Here is a [colour : #0000ff]blue[] colour.
Here is a new line with a [colour : #00ff00]green[] colour.");Modifiers can not span over multiple lines. Must be per line.
There is no automatic line break for normal strings.
Please use multi-line string literals or
\nif you want line breaks.
Modifiers must at minimum have one character space between
starting and closing tags.
"[wait_seconds : 2] []".Will be ignored otherwise.
Chitter().queue_empty("0_0");| ARGUMENT | TYPE | DESCRIPTION |
|---|---|---|
_id |
string | Queue ID |
Returns true if queue is empty.
Chitter().get_active_speaker_name();Returns current active speaker name set in .add() or added through modifier tags, else returns 0.
Chitter().get_active_speaker_sprite();Returns current active speaker sprite set in .add() or added through modifier tags, else returns 0.
Chitter().next("0_0");Sends the modified string from the queue to be drawn, and removes it from the queue.
Returns -1 if there are no more strings in the queue.
Returns 0 if typewriter skip is triggered.
Returns 1 if new string is sent to draw.
| ARGUMENT | TYPE | DESCRIPTION |
|---|---|---|
_id |
string | Queue ID |
While the modified string is being drawn, calling this again will auto skip the drawing and display the whole string modified.
If the whole string is displayed, calling it again will send the next (if there is one) modified string to be drawn.
Example to call function:
if keyboard_check_pressed(vk_space) {
Chitter().next("0_0");
}Recommend adding it to a triggered event of an object.
Chitter().draw(_x, _y);Draw the modified string.
| ARGUMENT | TYPE | DESCRIPTION |
|---|---|---|
_x |
REAL | X position of modified string to be drawn |
_y |
REAL | Y position of modified string to be drawn |
Recommend adding it to the draw GUI event of an object.
Chitter().cleanup();Removes all font sprites created at .initialise() from memory.