Skip to main content

The "vngen_get_width" Function


vngen_get_width(id, type, [name]);
idreal/stringThe ID of the specific entity to check
typeinteger/macroSets which type of entity to check
[name]stringOptional: Sets the character name to check, if entity is an attachment


Returns the absolute width of the specified entity, taking into account any active modifications and animations.

See Macros & Keywords for a full list of available entity types.


if mouse_region(vngen_get_x("John", 2), vngen_get_y("John", 2), vngen_get_width("John", 2), vngen_get_height("John", 2)) {
if (mouse_check_button_pressed(mb_left)) {
show_message: "John: Hey! You clicked me!";