RunScript
From GECK
A function added by the New Vegas Script Extender.
Description
Runs a script, which may be passed literally or attached to a form. This allows scripts to be run without a reference.
Returns true or false depending on what the script returns.
- Prior to xNVSE 6.2.9, this function did not return a value, as it instead printed its result in console.
Syntax
(bool) RunScript Script:Script-or-ScriptedForm
Example
RunScript MyScript ; to run script MyScript ; or RunScript MyToken ; to run the script attached to the item, MyToken
Unreliable?
- As of NVSE 4.6.3, this function seems to run the first block of the script once, and only if it is appropriate (eg: first block is GameMode).
See Also
- GetCurrentScript
- ResetAllVariables
- Call with User Defined Function (an alternative way to run scripts without a reference)