The "vngen_object_draw" Function

Syntax

vngen_object_draw(x, y, [highlight]);
ArgumentTypeDescription
xrealThe global horizontal offset for displaying all VNgen entities
yrealThe global vertical offset for displaying all VNgen entities
[highlight]booleanOptional: Enables or disables highlighting effects on speaking characters and text links

Description

Draws all VNgen entities at the specified location. Must be run in the Draw Event of each object containing VNgen code.

note

Note: It is also possible to draw VNgen in the Draw GUI Event, however this is not recommended.

While each VNgen entity possesses its own unique coordinates, this script can be used to also set global coordinates which determine where in the room VNgen appears as a whole. This is extremely useful when combining visual novels with other genres, as you may wish for your VNgen elements to appear where other game elements are physically located in the room. Another option is to draw VNgen in the GUI Event as opposed to the normal Draw Event, in which case the global offset can be set to 0, 0―no individual action coordinates must be altered to switch between drawing processes.

Additionally, VNgen characters are drawn with built-in fade/highlight support to emphasize who is currently speaking. If the name of a speaker set in vngen_text_* functions matches that of an active character, that specific character will be highlighted while all others are dimmed. This behavior is optional, however, and must be enabled or disabled in this script to function.

Example

vngen_object_draw(camera_get_view_x(view_camera[0]), camera_get_view_y(view_camera[0]), true);