Check if solid object is in range

0 favourites
  • 6 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • 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.

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

    Why? Isn't this the Plugin SDK?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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)