codah's Recent Forum Activity

  • By complicated I meant the Browser log stuff was doing a lot more than I needed.

    I have built a similar loop but for some reason it runs forever... It should run 11 times and stop but it just keeps going and going forever if I let it go...

    ***

    AHA! I needed a trigger... or else it just keeps looping 0-10 0-10 over and over...

    Making progress thanks for the help!

    Yep I had it under On Start of Layout but you could put it in a Function, etc. Anyway well done making progress

  • Yeah I didn't realise you could self sign! Ok great, I'll ask them to send me the keystore and see if that works. Thanks

    But you were already self-signing, weren't you? So what are they going to send you? Maybe you generated a new keystore instead of just signing with the same one, thus the error? I couldn't see the guide you followed due to the removed URL.

  • R0J0hound I see a new behaviour in your future... align-and-snap. With an automatic normal generator based on polygon edge

  • Thanks very much. I've adapted your design to my objects (well 1 so far) but the normal calculation will need to be hard coded for each object? As I have a number of objects. Did you just choose the angle (x1, y1, x2, t2) values by any special technique?

  • Line11 is a great trick! Never thought of it!

    It's a nice learning material, thanks R0J0hound !

    Question is, what would you do a few versions back when Wait for signal didn't exist? Wait 0 doesn't do it, even though I thought it's supposed to delay the following actions to the next tick. Wait 0.05 seems to do it. TBH 'tricks' like these concern me.

  • codah

    The math for the angle was simpler than I thought, but I was messing around with it blind for a bit.

    https://dl.dropboxusercontent.com/u/542 ... uzzle.capx

    Thanks R0J0hound, I'm going to see how I can incorporate this into my code. I'm sure this will be very useful to others as well <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> Cheers.

  • My idea would be to first have a sprite pinned to the center of snap-able each edge center of each shape. Let's call them "edge".

    Then when a shape is dropped pick the closest other edge that's closest to each of the shapes edges. Of the two pairs of edges only keep the closest. A little tedious to make events for but that would give you the two edges that would need to snap together.

    The snapping could be done by moving the dropped shape by the offset of the edges and orienting them based on the normals of the edges.

    I'm attempting to come up with an elegant event setup, so stand by for a capx.

    Yep exactly what I'm attempting Currently I find the nearest 'shape sprite' to the dropped one, then decide which 2 'edge sprites' from each shape sprite are closest, then do a move-to to bring them together (the shape is pinned to the edge sprite so it moves too). Now I just need to get the angle of the objects right. Thanks so much for your time and I'll be happy to look at any ideas/refinements you have!

  • Looks like you're not actually picking any objects. Just associating UID's is not enough. You're comparing enBox.hostUid = rdSlime.nestUid but at that moment, all enBox's and all rdSlime's are picked. Look into running a For each enBox loop around the system - compare, and inside the loop pick rdSlime by enBox.HostUid. If you had the full version, a Container would do the trick.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey TheDom thanks for the response. You mean Physics Puzzle? hmm not sure how that fits but perhaps I'm missing something. Could you be more specific? My needs are more like a tangram puzzle where the pieces must 'know' how they are allowed to fit together, and automatically move to the nearest piece and snap onto it.

    I'm also not using physics, although there might be a clever way to leverage physics to do this. I just thought it was overkill. And also it's important my pieces snap together fairly accurately.

    I've just looked at the jigsaw tutorial, but those pieces are arranged on a grid. Mine are arbitrarily placed.

  • If you run your game in debug, click on the sprite in the object tree on the left, you will see the bounding box rotating and changing shape in real time, just like what LittleStain did by creating a sprite to the bbox dimensions. I thought you would've done that before

  • I won't need to do the Log In Browser... but wow that's a cool trick. I didn't know you could do that.)

    um.. that was just for debugging....

    Here is the relevant bit. Not sure how that's complicated..

  • Firstly sorry for the bad diagram but I think it shows what I need.

    In words, I have certain shapes (not those shown) that can be drag around the layout. When dropped near to another shape, the dropped one should move to, align with (i.e. rotate), and 'snap' to, the shape nearest to where it was dropped. The shapes can only fit to each other in certain way (e.g. along specific edges).

    (I also need the shapes to be dragged off again (un-snapped) and to allow the connected shapes to be dragged as one, but the above is the main thing)

    I'm still deciding whether to have each shape as an animation frame of the one Sprite, or to have different Sprites for each shape.

    I have looked through the FAQ and forums. Some ideas come close, like magnetism effects, etc. I'm running with a couple of ideas involving lots of Pin-ing, but I'm sure there are elegant solutions that I'd not consider.

    Thanks!

codah's avatar

codah

Member since 30 May, 2014

Twitter
codah has 1 followers

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies