Skip to main content

The "vngen_set_prop" Function

Syntax#

vngen_set_prop(id, type, [name], prop, val);
ArgumentTypeDescription
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
propenumThe property to check, as an enumerator
valanyThe value to assign to the property

Description#

Modifies the value of the specified property of the given entity, if it exists.

Properties are written with the syntax "prop._property". A full list of valid properties can be found by editing sys_vngen_config. However, note that not all entities possess all available properties.

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

note

Warning: This script modifies internal VNgen behavior and is intended for advanced users only. Improper usage can cause errors or crashes. Use at your own risk!

Example#

var john_x = vngen_get_prop("John Doe", vngen_type_char, prop._x);
vngen_set_prop("John Doe", vngen_type_char, prop._x, john_x + 5);