object: members
39 implemented, 0 reserved. Entries are sorted by name.
Implemented
Section titled “Implemented”cancelevent
Section titled “cancelevent”object.cancelevent(event: string) -> number
Runs on: server and client. Origin: compatibility. Since: M8. Playground: yes.
Same as cancelevents: removes every pending scheduled event of the object with the given name.
this.cancelevent("Hit");Specification: vm-and-coroutines.md§7.3.
cancelevents
Section titled “cancelevents”object.cancelevents(event: string) -> number
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Removes every pending scheduled event of the object with the given name and answers how many it removed.
this.cancelevents("Hit");Specification: vm-and-coroutines.md§7.3.
addarraymember
Section titled “addarraymember”object.addarraymember(name: string) -> object
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Creates the member object stored under the name, or finds it, and returns it.
temp.row = temp.o.addarraymember("row");Specification: standard-library.md§17.4.2.
addnamedstring
Section titled “addnamedstring”object.addnamedstring(name: string, text: string) -> object
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Adds a member object with the name and a text variable set to the second argument, and returns it.
temp.o.addnamedstring("title", "Hello");Specification: standard-library.md§17.4.2.
catchevent
Section titled “catchevent”object.catchevent(target: any, event: string, callback: function)
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Runs a function of this object after another object handled an event. The function gets the other object first, then the arguments of the event.
this.catchevent(temp.panel, "onCreated", "seen");Specification: standard-library.md§17.4.4.
clearemptyvars
Section titled “clearemptyvars”object.clearemptyvars()
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Removes the variables that hold nothing: empty values and empty texts.
temp.o.clearemptyvars();Specification: standard-library.md§17.4.1.
clearvars
Section titled “clearvars”object.clearvars()
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Removes all dynamic variables of the object.
temp.o.clearvars();Specification: standard-library.md§17.4.1.
copyfrom
Section titled “copyfrom”object.copyfrom(source: object)
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Copies every dynamic variable of another object into this one; arrays are copied, objects are shared.
temp.b.copyfrom(temp.a);Specification: standard-library.md§17.4.1.
getarraymember
Section titled “getarraymember”object.getarraymember(name: string) -> object
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Returns the member object stored under the name, or an empty value.
temp.row = temp.o.getarraymember("row");Specification: standard-library.md§17.4.2.
getdynamicvarnames
Section titled “getdynamicvarnames”object.getdynamicvarnames() -> array
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Returns the names of the dynamic variables of the object, sorted alphabetically without regard to case.
temp.names = this.getdynamicvarnames();Specification: standard-library.md§6.3.
geteditvarnames
Section titled “geteditvarnames”object.geteditvarnames() -> array
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Returns the names of the variables a script can change.
echo(temp.o.geteditvarnames());Specification: standard-library.md§17.4.1.
getfunctions
Section titled “getfunctions”object.getfunctions() -> array
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Returns one object per function of the object scripts, with name, parameters, scope and description.
echo(temp.o.getfunctions().size());Specification: standard-library.md§17.4.1.
getstaticvarnames
Section titled “getstaticvarnames”object.getstaticvarnames() -> array
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Returns the names of the variables a script can change.
echo(temp.o.getstaticvarnames());Specification: standard-library.md§17.4.1.
getvarnames
Section titled “getvarnames”object.getvarnames() -> array
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Returns the names of the built-in variables of the object followed by its dynamic ones.
echo(temp.o.getvarnames());Specification: standard-library.md§17.4.1.
hasfunction
Section titled “hasfunction”object.hasfunction(name: string) -> number
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Returns 1 when the object has a function of that name. Called from another object, only public functions count.
if (npc.hasfunction("onHit")) npc.onHit();Specification: standard-library.md§6.3.
ignoreevent
Section titled “ignoreevent”object.ignoreevent(target: any, event: string)
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Forgets one catchevent made for the target and event.
this.ignoreevent(temp.panel, "onCreated");Specification: standard-library.md§17.4.4.
ignoreevents
Section titled “ignoreevents”object.ignoreevents(target: any)
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Forgets every catchevent made for the target.
this.ignoreevents(temp.panel);Specification: standard-library.md§17.4.4.
initialized
Section titled “initialized”object.initialized: boolean
Runs on: server and client. Origin: compatibility. Since: M1. Playground: no. read-only.
True once onCreated has run; always true for a TStaticVar.
echo(this.initialized);Specification: standard-library.md§17.4.5.
ispaused
Section titled “ispaused”object.ispaused: boolean
Runs on: server and client. Origin: compatibility. Since: M1. Playground: no.
When true the object receives no events; they are dropped, not queued.
this.ispaused = true;Specification: standard-library.md§17.4.5.
joinedclasses
Section titled “joinedclasses”object.joinedclasses: array
Runs on: server and client. Origin: compatibility. Since: M1. Playground: no. read-only.
The names of the classes joined to the object.
echo(this.joinedclasses);Specification: standard-library.md§17.4.5.
loadini
Section titled “loadini”object.loadini(path: string) -> boolean
Runs on: server only. Origin: compatibility. Since: M4. Playground: no.
Reads an INI file into the object: each [section] becomes a member object, and name=value lines become its variables.
temp.o.loadini("databases/settings.ini");Specification: standard-library.md§17.4.3.
loadjson
Section titled “loadjson”object.loadjson(path: string) -> boolean
Runs on: server only. Origin: compatibility. Since: M4. Playground: no.
Reads a JSON file into the variables of the object. Returns 0 for a missing file or invalid JSON.
temp.o.loadjson("databases/data.json");Specification: standard-library.md§17.4.3.
loadjsonfromstring
Section titled “loadjsonfromstring”object.loadjsonfromstring(text: string) -> number
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Reads a JSON object into the variables of the object, creating TStaticVar children for nested objects. Returns 1 on success, or 0 and changes nothing for invalid JSON.
temp.ok = this.loadjsonfromstring(temp.text);Specification: standard-library.md§7.2.
loadvars
Section titled “loadvars”object.loadvars(path: string) -> boolean
Runs on: server only. Origin: compatibility. Since: M4. Playground: no.
Reads name=value lines from a file in the script folders into the variables of the object. Returns 1, or 0 when the file cannot be read.
temp.o.loadvars("databases/player.txt");Specification: standard-library.md§17.4.3.
loadvarsfromarray
Section titled “loadvarsfromarray”object.loadvarsfromarray(lines: array)
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Sets dynamic variables from “name=value” strings, splitting each at its first equals sign.
this.loadvarsfromarray(temp.saved);Specification: standard-library.md§6.3.
loadxml
Section titled “loadxml”object.loadxml(path: string) -> boolean
Runs on: server only. Origin: compatibility. Since: M4. Playground: no.
Reads an XML file into the variables of the object. Returns 0 for a missing file or malformed XML.
temp.o.loadxml("databases/data.xml");Specification: standard-library.md§17.4.3.
loadxmlfromstring
Section titled “loadxmlfromstring”object.loadxmlfromstring(xml: string) -> boolean
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Reads XML text into the variables of the object. Returns 0 and leaves the object as it was when the text is malformed.
temp.o.loadxmlfromstring("<r><a>1</a></r>");Specification: standard-library.md§17.4.3.
maxlooplimit
Section titled “maxlooplimit”object.maxlooplimit: number
Runs on: server and client. Origin: compatibility. Since: M1. Playground: no.
How many loop iterations one run of the object may spend, up to the engine limit.
this.maxlooplimit = 5000;Specification: standard-library.md§17.4.5.
objecttype
Section titled “objecttype”object.objecttype() -> string
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Returns the type name of the object, such as TStaticVar or TServerNPC.
echo(temp.obj.objecttype());Specification: standard-library.md§6.2.
savejson
Section titled “savejson”object.savejson(path: string, mode?: number, format?: number) -> boolean
Runs on: server only. Origin: compatibility. Since: M4. Playground: no.
Writes the variables of the object as JSON to a file in the script write folders. Mode 0 replaces the file, 1 appends; format flag 1 indents the output.
temp.o.savejson("databases/data.json", 0, 1);Specification: standard-library.md§17.4.3.
savejsontostring
Section titled “savejsontostring”object.savejsontostring(indent: number, recursive?: any) -> string
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Writes the dynamic variables of the object as JSON, compact for an indent of 0 and indented otherwise. Variables holding objects become “unknown_object” unless recursive is true.
echo(this.savejsontostring(0));Specification: standard-library.md§7.1.
savevars
Section titled “savevars”object.savevars(path: string, mode?: number) -> boolean
Runs on: server only. Origin: compatibility. Since: M4. Playground: no.
Writes the variables of the object as name=value lines, sorted by name, to a file in the script write folders. Mode 0 replaces the file, 1 appends.
temp.o.savevars("databases/player.txt", 0);Specification: standard-library.md§17.4.3.
savevarstoarray
Section titled “savevarstoarray”object.savevarstoarray(flag?: any) -> array
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Returns the dynamic variables as an array of “name=value” strings in the order they were created, leaving out variables that hold objects. The argument has no effect.
temp.saved = this.savevarstoarray(false);Specification: standard-library.md§6.3.
savexml
Section titled “savexml”object.savexml(path: string, mode?: number) -> boolean
Runs on: server only. Origin: compatibility. Since: M4. Playground: no.
Writes the variables of the object as XML to a file in the script write folders. Mode 0 replaces the file, 1 appends.
temp.o.savexml("databases/data.xml", 0);Specification: standard-library.md§17.4.3.
savexmltostring
Section titled “savexmltostring”object.savexmltostring() -> string
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Returns the variables of the object as XML text.
echo(temp.o.savexmltostring());Specification: standard-library.md§17.4.3.
scripterrors
Section titled “scripterrors”object.scripterrors: array
Runs on: server and client. Origin: compatibility. Since: M1. Playground: no. read-only.
The texts of the last 50 errors raised by the scripts of the object.
echo(this.scripterrors.size());Specification: standard-library.md§17.4.5.
scriptlogmissingfunctions
Section titled “scriptlogmissingfunctions”object.scriptlogmissingfunctions: boolean
Runs on: server and client. Origin: compatibility. Since: M1. Playground: no.
When true a call to a function the object lacks is reported.
this.scriptlogmissingfunctions = true;Specification: standard-library.md§17.4.5.
timeout
Section titled “timeout”object.timeout: number
Runs on: server and client. Origin: compatibility. Since: M1. Playground: no.
Seconds left on the timer of the object, 0 when none runs; assigning a number starts the timer.
this.timeout = 0.5;Specification: standard-library.md§17.4.5.
trigger
Section titled “trigger”object.trigger(event: string, ...args?: any)
Runs on: server and client. Origin: compatibility. Since: M1. Playground: yes.
Queues the event onName for the object and returns at once. The queue runs after the current invocation returns or suspends, in the order the events were queued. Arguments become the parameters and the params array of the handler.
this.trigger("Hit", 5);Specification: vm-and-coroutines.md§5.4.
Engine version 0.1.0. Built 2026-11-18.