Table of Contents

Class VirtualMachine

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

Standard and Low Level methods and properties for querying/interacting with the NwScript virtual machine.

public sealed class VirtualMachine
Inheritance
VirtualMachine
Inherited Members
Extension Methods

Properties

CurrentRunningEvent

Gets or sets the current running script event.

InstructionLimit

Gets or sets the instruction limit for the NWScript VM.

InstructionsExecuted
IsInScriptContext

Returns true if the current executing code is being executed on the main thread, and in a Virtual Machine script context.

RecursionLevel
ScriptReturnValue

Methods

Execute(string, NwObject?, params (string ParamName, string ParamValue)[])

Executes the specified NWN script. If scriptName does not specify a compiled script, nothing happens.

Execute(string, params (string ParamName, string ParamValue)[])

Executes the specified NWN script. If scriptName does not specify a compiled script, nothing happens.

ExecuteInScriptContext(Action, uint, int)
ExecuteInScriptContext<T>(Func<T>, uint, int)
GetCurrentScriptName(int)

Gets the name of the currently executing script.
If depth is > 0, it will return the name of the script that called this one via ExecuteScript().