Skip to main content

The "vngen_emote_create" Function

Syntax#

vngen_emote_create(id, sprite, x, y, z, [loop]);
ArgumentTypeDescription
idreal/stringThe unique identifier to use for the new emote
spritespriteThe sprite to display as an emote
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
[loop]booleanOptional: Enables or disables endlessly looping the emote

Description#

Creates a new emote 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.

Example#

vngen_event() {
vngen_emote_create("emote", spr_emote, 50, 50, -1, true);
}