sim.getScript

Retrieves the handle of a script

Synopsis

int scriptHandle = sim.getScript(int scriptType, int objectHandle = -1, string scriptName = '') int scriptHandle = sim.getScript(int scriptType, int objectHandle = -1, string scriptName = '')

Arguments

  • scriptType: type of the script, or sim.handle_self
  • objectHandle: handle of the object the script is attached to, in case of a child- or customization script
  • scriptName: name of the add-on, in case of an add-on

Return values

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