Skip to main content

The "vngen_script_execute" Function

Syntax#

vngen_script_execute(script, argument0, argument1, argument2...);
ArgumentTypeDescription
scriptscriptThe script to execute
argument0 ... argument31anyUp to 32 values to pass into the script as arguments

Description#

Executes the input script as an action in the context of Quantum events. The specified script can be anything, but be aware that scripts executed with this function will be performed only once when the containing event first becomes active.

While this function may appear identical to vngen_script_execute_ext, it comes with one critical difference: scripts are prevented from being re-executed during vngen_goto event skip operations.

Example#

vngen_event() {
vngen_script_execute(vngen_goto, "my_event");
}

This will cause the engine to jump to the event "my_event" as soon as the example event is reached, but not if the event is skipped with vngen_goto. This use-case is exceptionally useful when managing branching paths in a single object.