Skip to main content

The "vngen_text_modify_ext" Function

Syntax#

vngen_text_modify_ext(id, x, y, z, xscale, yscale, rot, col1, col2, col3, col4, shadow, outline, alpha, duration, ease);
ArgumentTypeDescription
idreal/stringThe ID of the text to modify (or keyword all for all text)
xrealThe horizontal position to display the text, relative to the global offset
yrealThe vertical position to display the text, relative to the global offset
zrealThe drawing depth of the text, relative to other text only
xscalerealThe horizontal scale multiplier, where 1 is default
yscalerealThe vertical scale multiplier, where 1 is default
rotrealThe text rotation, in degrees
col1color/macroThe text top-left gradient color, where c_white is default (or keyword previous for no change, or keyword inherit for saved style)
col2color/macroThe text top-right gradient color, where c_white is default (or keyword previous for no change, or keyword inherit for saved style)
col3color/macroThe text bottom-right gradient color, where c_white is default (or keyword previous for no change, or keyword inherit for saved style)
col4color/macroThe text bottom-left gradient color, where c_white is default (or keyword previous for no change, or keyword inherit for saved style)
shadowcolor/macroThe text shadow color, where 'none' is default (or keyword previous for no change, keyword inherit for saved style, or 'none' for none)
outlinecolor/macroThe text outline color, where 'none' is default (or keyword previous for no change, keyword inherit for saved style, or 'none' for none)
alphareal (0-1)The alpha transparency value, where 1 is default and 0 is fully transparent
durationrealSets the length of the modification transition, in seconds
easeinteger/macroSets the ease mode for the modification transition

Description#

Combines vngen_text_modify_style and vngen_text_modify_pos with a few extra options, applying a new position, scale, rotation, four-color gradient, and transparency modifications to the input entity ID.

All modifications made with this script are permanent and will persist until another modification is performed. This script cannot be performed simultaneously with other modification actions operating on the same entity ID.

Unlike other entities, color modifications applied to text elements are applied to each individual character in the string rather than to the string as a whole. The exception to this is animations, which are applied as normal.

See Macros & Keywords for a list of available style modes and ease modes.

Example#

vngen_event() {
vngen_text_modify_ext("text", 0, 0, -1, 1.5, 1.5, 0, c_yellow, c_yellow, c_orange, c_orange, 1, 2, ease_sin_out);
}