isexecutorthread
Checks whether a thread was created by Volt.
Syntax
isexecutorthread(thread?: thread) -> booleanParameters
| Parameter | Type | Description |
|---|---|---|
thread | thread? | Thread to inspect; defaults to the current thread |
Returns
| Type | Description |
|---|---|
boolean | True when the thread is an executor thread |
Example
print(isexecutorthread()) -- true for a normal Volt script thread
local runningScript = getrunningscripts()[1]
local gameThread = runningScript and getscriptthread(runningScript)
if gameThread then
print(isexecutorthread(gameThread)) -- false
endRelated Functions
checkcaller- Check the current call origingetscriptfromthread- Inspect a thread's associated script