The "vngen_attach_create" Function
#
SyntaxArgument | Type | Description |
---|---|---|
name | string | The ID of the character to apply the attachment to |
id | real/string | The unique identifier to use for the new attachment |
sprite | sprite | The sprite to draw as an attachment |
x | real | The horizontal position to display the attachment, relative to the character top-left corner |
y | real | The vertical position to display the attachment, relative to the character top-left corner |
z | real | The drawing depth of the attachment, relative to other attachments only |
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 attachment for the input character ID which will be displayed until vngen_attach_destroy
is run. Multiple attachments can exist simultaneously, however no two attachments may share the same ID on the same character. 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, because attachments are specific to each character, attachments on other characters can use the same ID without conflict.
Note that all coordinates are relative to the parent character, including the z-index. For attachments, negative z-index will display the attachment in front of the parent character, while positive z-index will display the attachment behind them.
See Included Animations and Macros & Keywords for a list of available transition animations and ease modes.