C. Dev's Forum Posts

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Hey there,

    I've just discovered an issue while using the DOMHandler in a plugin.

    I have this code for defining the message handlers:

    this.AddRuntimeMessageHandlers([
    ["open", (id, scopes, callback) => this._OpenWin(id, scopes, callback)],
    ]);
    

    Sadly only the `id` param is defined. All other ones (`scopes` and `callback`) return undefined while using.

    not sure if I do something wrong in calling the func:

    Can anyone help me with this?

    Tagged:

  • Nevermind, I fixed it. I guess the issue was that defined the file in the plugin.js 2 times...

  • Hey there,

    I am using DOM-script for opening a new window in worker mode. But since a few days I am getting this error:

    It is caused by this:

    Does anyone know what the issue is?

    Tagged:

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • you can use itch.io

  • You’ll have to refer to the documentation for how to do it.

    Basically you’d access the runtime object, find the list of object types from that, then a list of each instance for each type. Then you can either compare the x y or calculate the distance with:

    var dx=x1-x0, dy=y1-y0

    Math.sqrt(dx*dx+dy*dy)

    Or maybe the sdk has a distance function you can use. Anyways that’s the gist of it.

    Thanks!

  • Is it possible to get the X and Y coordinates + distances from other objects using a behaviour?