The "vngen_count" Function


vngen_count(type, [name]);
typeinteger/macroSets which type of entity to check
[name]stringOptional: Sets the character name to check, if entity is an attachment


Returns the number of entities of the given type that currently exist.

Note that in the case of buttons, results will differ depending on whether the log is currently open or not. If so, only log buttons will be counted, while if not, only non-log buttons will be counted instead.

See Macros & Keywords for a full list of available entity types. In addition to standard types, this script also supports checking the current speaking character(s) which can be used, for example, to trigger different UI styles depending on whose lines are in focus.


draw_text(x, y, "There are currently " + string(vngen_count(vngen_type_char)) + " characters.");