0 Favourites

How do I trigger state based on overlapping sprite UID....

  • Hey there,

    So I posted yesterday with an issue about pinning objects correctly, which I managed to figure out later. However, my new issue is regarding triggering a platform movement correctly when a bunch of my platformers are near each other. I have "overlap detectors" on either side of the platforms that are triggered when a rotating spite overlaps them, while also overlapping the player (the rotating sprite checks a variable to ensure it matches the UID of the detector). They work fine so long as they are not near each other, with their detectors overlapping. I need them to work regardless of whether these "overlap detectors" are, themselves, also overlapping. I hope that makes sense.

    Any help is greatly appreciated!!

    Here is my capx for further clarification:

  • Maybe try putting the detectors in a family and check for your objects overlapping the family rather than each independent detector sprite?

  • Hmm, unfortunately that isn't fixing the issue. Thanks for the suggestion though . I hope someone can figure out why this is happening! I've been spending so much time on this issue that it's becoming obsessional haha.

  • bump.... I believe my issue is with events 12/13, with setting the state of my angular sprite...Just not sure what I've done wrong there, I've tried pick by evaluate for the overlap left and right sprites as well...

  • More people might be able to help you, but you are using the third party plugin platformplus and because of that they can't open your capx..

  • Oh jeez - sorry about that (And thanks for bringing that to my attention - I thought I'd removed it from the project) ! Let me upload a version without it!

    Here it is with the standard platform behavior:

  • Sorry to post so often about this but I was thinking that I may have been wrong in not using families as was suggested by gumshoe2029 . I tried using family collisions with a function to check UIDs but my success has been limited (Items are setting their overlaps states inconsistently, or not at all. Sometimes 1 will work consistently but it still appears tripped up when overlapping other detectors that don't match it's UID variables). I feel like I'm on the right track though. Here is what I have currently:

    What might I be doing wrong?

    Thanks to anyone for any suggestions. I appreciate any consideration.

  • Sorry for neglecting you, I wrecked my car recently, so I have been a bit pre-occupied.

    Sadly, I am not quite as dextrous with families as my client lead. I'll see if I can get him to reply here for you.

  • I am so sorry to hear about your car! You weren't hurt, were you?

  • Do you need these overlap sprites at all? It seems you're only using them to check if the player is on the right or left. You could just compare x positions.

  • I've updated it to use a container - it makes the picking easier as you don't have to store the UIDS for all the different parts. capx: angletriggerplatformer2.capx (r221)

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • ramones Yeah, in my project the x and y planes are not static (they rotate around pretty frequently). I tried doing a switch for closest x *or* y depending on the angle of the platform objects but the code became pretty convoluted and in some instances the platformers would break transitioning from one set of angles to another, leaving them standing in place. I thought something like this would be much more reliable in that it doesn't rely on the Cartesian system and would require far less code, once solid and functional.

  • I've updated it to use a container - it makes the picking easier as you don't have to store the UIDS for all the different parts. capx: angletriggerplatformer2.capx (r221)

    Dude! You have totally made my whole week. Thank you very much!!

    EDIT: Also, sorry, I saw this post after the first one.

  • I am so sorry to hear about your car! You weren't hurt, were you?

    Thankfully, no, but it is not how I wanted to spend my savings while developing this game...

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