C. Dev's Forum Posts

  • 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?

  • Posting in Scripting section to retrieve more relevan answer to your question.

    Why? Isn't this the Plugin SDK?

  • If there are more than one type of solid object, you will likely to create Family and add those solid as member. Let's name the family class "solid_family". Then set condition > system > compare between two values > distance(Sprite.X, Sprite.Y, solid_family.X, solid_family.Y) less or equal to 10. Proceed to action and execute what you want to do when condition met.

    And for 8-directions behavior you need to specify certain condition that will trigger an action. For the action part simply pick simulate control and choose control: Right.

    I mean using js...

  • Hi,

    I want to check if there is a solid object in the range of 10px using a behaviour.

    And I also want to ask how I can trigger (f.e. if the 8-direction behaviour is added) that the object moves to the right!

    Thanks!

  • Got it to work now, thanks!

  • This question has come up a couple of times so I've added a new DOM Messaging plugin sample to the plugin SDK download here: https://www.construct.net/en/make-games/manuals/addon-sdk

    It uses DOM messaging to set and get the document title, since that is a simple DOM API that can't be used in a worker.

    Thanks very much!

  • Moved to Plugin SDK forum.

    See the section on DOM calls in the Addon SDK documentation.

    Im not a 100% sure how I can use DOM calls to use window in worker mode?

  • Are you using the addon SDK to write a plugin, or using Construct's scripting feature? This is the forum for the latter, but you mentioned a plugin.

    I use the addon SDK

  • Hello,

    I have searched a bit around but haven't found a solution for my problem...

    I am trying to open a window with window.open() in my Plugin but still want to support worker-mode.

    Anyone has a solution for this?

    Thanks very much!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Maybe..

    So is there any software that can be converted with it?

    I am currently working on a software that can convert Construct plugins

  • You do not have permission to view this post

  • Hi!

    I have searched on how I can implement a login with discord in construct but haven't found anything :(

    Can anyone tell me how I can do this?

    Or are there any addons that can make this?

    Hi,

    I have made this addon for oauth2:

    huskycraft.itch.io/construct-3-discord-oauth2

  • You do not have permission to view this post

  • You do not have permission to view this post