Regular API function

simGetScriptAttribute / sim.getScriptAttribute

Description Reads various script attributes or properties. See also sim.setScriptAttribute.
C synopsis simInt simGetScriptAttribute(simInt scriptHandle,simInt attributeID,simFloat* floatVal,simInt* intOrBoolVal)
C parameters
scriptHandle: handle of a script
attributeID: the script attributeID
floatVal: pointer to a floating point value, receiving the floating point attribute (if applicable)
intOrBoolVal: pointer to an integer value, receiving the integer or boolean attribute (if applicable)
C return value
-1 if operation was not successful
Lua synopsis number/boolean attribute=sim.getScriptAttribute(int scriptHandle,int attributeID)
Lua parameters
Similar to the C-function counterpart. Additionally, scriptHandle can be sim.handle_self to target the current script.
Lua return values
attribute: the requested attribute value