Check if solid object is in range

0 favourites
  • 6 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • 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!

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

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

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Posting in Scripting section to retrieve more relevan answer to your question.

    Why? Isn't this the Plugin SDK?

  • If what you mean by js is javasript I believe scripting section is more proper thread to drop related question.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)