The "vngen_char_create" Function
#
SyntaxArgument | Type | Description |
---|---|---|
name | string | The unique identifier to use for the new character |
spr_body | sprite | The sprite to draw as a character body |
spr_face_idle | sprite | The sprite to draw as an idle face (or keyword none for none) |
spr_face_talk | sprite | The sprite to draw as a talking face (or keyword none for none) |
x | real | The horizontal position to display the character, relative to the global offset |
y | real | The vertical position to display the character, relative to the global offset |
z | real | The drawing depth of the character, relative to other characters only |
face_x | real | The horizontal position to display the face, relative to the body sprite top-left corner |
face_y | real | The vertical position to display the face, relative to the body sprite top-left corner |
flip | boolean | Enables or disables horizontally flipping the character |
transition | script | Sets the transition animation to perform |
duration | real | Sets the duration of the transition animation, in seconds |
[ease] | integer/macro | Optional: Sets the ease override for the transition script |
#
DescriptionCreates a new character which will be displayed until vngen_char_destroy
is run. Multiple characters can exist simultaneously, however no two characters may share the same ID. Also note that unlike other entities, character IDs must be strings, not real numbers.
Note that using separate face sprites is optional. If only a body sprite is desired, spr_face_idle
and spr_face_talk
can be set to -1 or the keyword none
to disable them.
See Included Animations and Macros & Keywords for a list of available transition animations and ease modes.