Standard and Low Level methods and properties for querying/interacting with the NwScript virtual machine.
More...
|
void | Execute (string scriptName, NwObject? target, params(string ParamName, string ParamValue)[] scriptParams) |
| Executes the specified NWN script. If scriptName does not specify a compiled script, nothing happens. More...
|
|
void | Execute (string scriptName, params(string ParamName, string ParamValue)[] scriptParams) |
| Executes the specified NWN script. If scriptName does not specify a compiled script, nothing happens. More...
|
|
void | ExecuteInScriptContext (System.Action action, uint objectId=NwObject.Invalid, int scriptEventId=0) |
|
T | ExecuteInScriptContext< T > (System.Func< T > action, uint objectId=NwObject.Invalid, int scriptEventId=0) |
|
string? | GetCurrentScriptName (int depth=0) |
| 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(). More...
|
|
|
EventScriptType | CurrentRunningEvent [get, set] |
| Gets or sets the current running script event. More...
|
|
uint | InstructionLimit [get, set] |
| Gets or sets the instruction limit for the NWScript VM. More...
|
|
uint | InstructionsExecuted [get, set] |
|
bool | IsInScriptContext [get] |
| Returns true if the current executing code is being executed on the main thread, and in a Virtual Machine script context. More...
|
|
int | RecursionLevel [get] |
|
bool | ScriptReturnValue [get] |
|
Standard and Low Level methods and properties for querying/interacting with the NwScript virtual machine.
◆ Execute() [1/2]
void Anvil.API.VirtualMachine.Execute |
( |
string |
scriptName, |
|
|
NwObject? |
target, |
|
|
params(string ParamName, string ParamValue)[] |
scriptParams |
|
) |
| |
|
inline |
Executes the specified NWN script. If scriptName does not specify a compiled script, nothing happens.
◆ Execute() [2/2]
void Anvil.API.VirtualMachine.Execute |
( |
string |
scriptName, |
|
|
params(string ParamName, string ParamValue)[] |
scriptParams |
|
) |
| |
|
inline |
Executes the specified NWN script. If scriptName does not specify a compiled script, nothing happens.
◆ GetCurrentScriptName()
string? Anvil.API.VirtualMachine.GetCurrentScriptName |
( |
int |
depth = 0 | ) |
|
|
inline |
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().
- Parameters
-
depth | depth to seek the executing script. |
- Returns
- The name of the currently executing script.
◆ CurrentRunningEvent
EventScriptType Anvil.API.VirtualMachine.CurrentRunningEvent |
|
getset |
Gets or sets the current running script event.
◆ InstructionLimit
uint Anvil.API.VirtualMachine.InstructionLimit |
|
getset |
Gets or sets the instruction limit for the NWScript VM.
◆ IsInScriptContext
bool Anvil.API.VirtualMachine.IsInScriptContext |
|
get |
Returns true if the current executing code is being executed on the main thread, and in a Virtual Machine script context.
The documentation for this class was generated from the following file:
- NWN.Anvil/src/main/API/Utils/VirtualMachine.cs