Skip to main content

The "vngen_prompt_create_ext" Function

Syntax#

vngen_prompt_create_ext(id, trigger, sprite_idle, sprite_active, sprite_auto, xorig, yorig, x, y, z, scaling, transition, duration, ease);
ArgumentTypeDescription
idreal/stringThe unique identifier to use for the new prompt
triggernameThe character name to use as a trigger for displaying the prompt (or keyword any for all characters)
sprite_idlespriteThe sprite to draw as a prompt when waiting for user input
sprite_activespriteThe sprite to draw as a prompt when the typewriter effect is active (or keyword none for none)
sprite_autospriteThe sprite to draw when auto mode is enabled (or keyword none for none)
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 prompt, relative to the global offset
yrealThe vertical position to display the prompt, relative to the global offset
zrealThe drawing depth of the prompt, relative to other prompts only
scalinginteger/macroSets the automatic scaling mode for the prompt
transitionscriptSets the transition animation to perform
durationrealSets the duration of the transition animation, in seconds
easeinteger/macroSets the ease override for the transition script

Description#

Creates a new prompt icon with extra options which will be displayed until vngen_prompt_destroy is run. Multiple prompts can exist simultaneously, however no two prompts 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.

Unlike other entities, prompts feature an automatic position mode which will display prompts next to text--even while the typewriter effect is active.

See Included Animations and Macros & Keywords for a list of available origin points, scaling modes, transition animations, and ease modes.

Example#

vngen_event() {
vngen_prompt_create_ext("prompt", "John Doe", spr_prompt_idle, spr_prompt_active, spr_prompt_auto, orig_left, orig_center, auto, auto, 0, scale_none, trans_fade, 1, ease_sin_out);
}