Ashley's Recent Forum Activity

  • I'm not sure, try it and see. You might want to compare positions directly instead of testing for collisions anyway.

  • 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

  • Do you just want to show a grid, or display objects snapped to a grid?

    Snapping to a grid is easy, just set every object's X and Y to:

    round(Object.X / 32) * 32

    round(Object.Y / 32) * 32

    where 32 is the size of the grid cell.

  • I'll see if I can do something for the next build!

  • By default the compare values condition just picks the first instance of an object, so it doesn't work with multiple instances. That's why distance() doesn't appear to work with multiple instances.

    However, you can fix it with for-each:

    + For each A

    + For each B

    + distance(A.x, A.y, B.x, B.y) < 100

    -> A: look at B

    This repeats the distance() comparison for every combination of A and B, so every A looks at a B inside its range. (Not the nearest one - that's a fair bit more complicated - but it works OK this way.)

  • The usual way to see if an object has stopped is to test if its speed equals 0.

  • You do not have permission to view this post

  • You need to send the header:

    Access-Control-Allow-Origin: *

    in the response from the server you send the AJAX request to. Otherwise, the browser will block the request.

  • Hi all,

    Just a heads up we're taking a break from 1st to 8th October. We'll try to pop by from time to time, but we'll mostly be away! That means no email replies, forum posting, bug fixes or releases.

    We'll get right back into things when we get back on the 8th - back to the usual.

  • Construct 2 is a 2D game development tool. We're not planning on adding any significant 3D features, except possibly simple Z elevation like in Construct Classic, or shaders in the WebGL canvas.

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,771,371 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs