The "vngen_char_replace" Function
#
SyntaxArgument | Type | Description |
---|---|---|
name | string | The ID of the character to replace |
spr_body | sprite | The new sprite to draw as a character body |
spr_face_idle | sprite | The new sprite to draw as an idle face (or keyword none for none) |
spr_face_talk | sprite | The new sprite to draw as a talking face (or keyword none for none) |
face_x | real | The horizontal position to display the face, relative to the body sprite top-left corner (or keyword previous for no change) |
face_y | real | The vertical position to display the face, relative to the body sprite top-left corner (or keyword previous for no change) |
flip | boolean | Enables or disables horizontally flipping the character |
duration | real | Sets the duration of the fade transition, in seconds |
[ease] | integer/macro | Optional: Sets the ease mode to perform the transition in |
#
DescriptionReplaces the input entity ID with a new set of sprites and fades the old character to the new one over the input duration.
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.
As with other types of modifications, replacements made with this script are permanent and will persist until another replacement is performed. This script cannot be performed simultaneously with other replacement actions operating on the same entity ID.
See Macros & Keywords for a list of available ease modes.