(5.5.0) scribble_autotype_fade_in - JujuAdams/ScribbleOldDocs GitHub Wiki

scribble_autotype_fade_in(element, method, speed, smoothness)

Returns: N/A (0)

Argument Name Purpose
0 element Text element to target. This element must have been created previously by scribble_draw()
1 method Typewriter method to use to fade in, either per-character or per-line. See below
2 speed Amount of text to reveal per tick (1 tick is usually 1 frame). This is character or lines depending on the method defined above
3 smoothness How much text fades in. Higher numbers will allow more text to be visible as it fades in

The method argument allows you to choose between two behaviours to fade in text. Most retro-styled games will likely want to use SCRIBBLE_AUTOTYPE_PER_CHARACTER: this method will draw characters one by one like a typewriter. Modern text-heavy narrative games may want to use SCRIBBLE_AUTOTYPE_PER_LINE instead.

How the text is revealed can be customised further by modifying the smoothness argument. A high value will cause text to be smoothly faded in whereas a smoothness of 0 will cause text to instantly pop onto the screen. For advanced users, custom shader code can be easily combined with the smoothness value to animate text as it fades in.

Events (in-line scripts) will be executed as text fades in. This is a powerful tool and can be used to achieve many things, including triggering sound effects, changing character portraits, starting movement of instances, starting weather effects, giving the player items, and so on.

⚠️ **GitHub.com Fallback** ⚠️