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. In a future release, a more differentiated return value might be available
Lua synopsis
number/boolean attribute=sim.getScriptAttribute(number scriptHandle,number attributeID)
Lua parameters
Same as C-function
Lua return values
attribute
: the requested attribute value
All regular API functions on one page