simGetScriptHandleEx

Retrieves the handle of a script.

C++ synopsis

int simGetScriptHandleEx(int scriptType, int objectHandle, const char* scriptName)

Arguments

  • scriptType: the type of the script.
  • objectHandle: the object handle the script is attached to (in case of child- or customization scripts. Can be -1.
  • scriptName: the path of the object the script is attached to (in case of child- or customization scripts), or the name of the add-on. Can be nullptr.

Return

  • handle of the script, or -1 if the script does not exist.