The "vngen_get_index" Function


vngen_get_index(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 numerical index of the specified entity of the given ID and type, or 'undefined' if the entity or type does not exist.

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 will return the index of the text element containing the speaking character's dialog.


var index = vngen_get_index("John Doe", vngen_type_char);