The "vngen_emote_create_ext" Function

Syntax

vngen_emote_create_ext(id, sprite, xorig, yorig, x, y, z, xscale, yscale, rot, col1, col2, col3, col4, alpha, [loop]);
ArgumentTypeDescription
idreal/stringThe unique identifier to use for the new emote
spritespriteThe sprite to display as an emote
xorigreal/macroThe horizontal sprite offset, or origin point, relative to the top-left corner
yorigreal/macroThe vertical sprite offset, or origin point, relative to the top-left corner
xrealThe horizontal position to display the emote, relative to the global offset
yrealThe vertical position to display the emote, relative to the global offset
zrealThe drawing depth of the emote, relative to other emotes only
xscalerealThe horizontal scale multiplier, where 1 is default
yscalerealThe vertical scale multiplier, where 1 is default
rotrealThe emote rotation, in degrees
col1colorThe top-left gradient color, where c_white is default
col2colorThe top-right gradient color, where c_white is default
col3colorThe bottom-right gradient color, where c_white is default
col4colorThe bottom-left gradient color, where c_white is default
alphareal (0-1)The alpha transparency value, where 1 is default and 0 is fully transparent
[loop]booleanOptional: Enables or disables endlessly looping the emote

Description

Creates a new emote with extra options which will be displayed until the sprite animation is complete, at which point it will self-destruct and be removed from memory. Alternatively, the emote can be set to loop endlessly, in which case it will continue to exist until destroyed manually.

Multiple emotes can exist simultaneously, however no two emotes 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.

See Macros & Keywords for a list of available origin points.

Example

vngen_event() {
vngen_emote_create_ext("emote", spr_emote, orig_center, orig_center, 50, 50, -1, 1, 1, 0, c_yellow, c_yellow, c_orange, c_orange, 1);
}