The "vngen_option_clear" Function

Syntax

vngen_option_clear([id]);
ArgumentTypeDescription
[id]real/stringOptional: The ID of the option block to clear results from

Description

Manually clears option results (not data) to prevent repeat execution of option-based triggers. As this functionality is also handled by vngen_get_option, this script should not typically need to be run except in special cases.

If an ID is supplied, the option result will be cleared from the history, and it will be as if the choice was never made. However, the most recent option in memory will not be cleared. In this case, this script should be run twice to clear both, if needed.

This script is not an action.

Example

if (vngen_get_option() == "op1") {
my_var += 1;
vngen_option_clear();
}
var result = vngen_get_option("my_option");
vngen_option_clear("my_option");