Skip to main content

The "vngen_label_create" Function

Syntax#

vngen_label_create(id, label, x, y, z, linebreak, font, color, transition, duration, [ease], [lang]);
ArgumentTypeDescription
idreal/stringThe unique identifier to use for the new label
labelstringThe text string to display as a label (or keyword auto for speaker names)
xrealThe horizontal position to display the label, relative to the global offset
yrealThe vertical position to display the label, relative to the global offset
zrealThe drawing depth of the label, relative to other labels only
linebreakrealThe width in pixels before text is wrapped into a new line
fontfont/macroThe font to draw text in, where fnt_default is default (or keyword inherit for saved style)
colorcolor/macroThe color to draw text in, where c_white is default (or keyword inherit for saved style)
transitionscriptSets the transition animation to perform
durationrealSets the duration of the transition animation, in seconds
[ease]integer/macroOptional: Sets the ease override for the transition script
[lang]real/stringOptional: Sets the language flag for the label

Description#

Creates a new static string of text which will be displayed until vngen_label_destroy is run. Multiple labels can exist simultaneously, however no two labels may share the same ID. VNgen entity IDs are arbitrary and most can be either numbers or strings, but bear in mind that -1 is reserved as 'null' and cannot be used as an ID.

While labels share many properties with standard text elements, labels are static and do not affect progression, character speaking animations, or the backlog, and do not support advanced features such as a typewriter effect or markup.

While the actual label text can be anything, it is also possible to set labels to automatically display the name of the current speaker(s) defined by other text elements. This value is updated automatically at the start of every event, meaning the label does not require replacing to reflect each new speaker.

See Included Animations and Macros & Keywords for a list of available style modes, transition animations, and ease modes. See Language Functions for details on multi-language support.

Example#

vngen_event() {
vngen_label_create("label", auto, 100, 750, -1, 384, fnt_Arial, c_white, trans_wipe_right, 2);
vngen_label_create("label", "John Doe", 100, 750, -1, 384, fnt_Arial, c_white, trans_wipe_right, 2, "en-US");
}