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

Get help using Construct 2

Post » Tue Jan 19, 2016 1:46 am

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:
https://www.dropbox.com/s/lsa9klbwgvhav ... .capx?dl=0
B
42
S
26
G
22
Posts: 307
Reputation: 15,141

Post » Tue Jan 19, 2016 4:57 pm

Maybe try putting the detectors in a family and check for your objects overlapping the family rather than each independent detector sprite?
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,317
Reputation: 4,628

Post » Tue Jan 19, 2016 5:13 pm

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.
B
42
S
26
G
22
Posts: 307
Reputation: 15,141

Post » Thu Jan 21, 2016 7:57 pm

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...
B
42
S
26
G
22
Posts: 307
Reputation: 15,141

Post » Fri Jan 22, 2016 12:15 am

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Jan 22, 2016 1:31 am

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: https://www.dropbox.com/s/lsa9klbwgvhav ... .capx?dl=0
B
42
S
26
G
22
Posts: 307
Reputation: 15,141

Post » Fri Jan 22, 2016 7:49 am

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:
Image

What might I be doing wrong?

Thanks to anyone for any suggestions. I appreciate any consideration.
B
42
S
26
G
22
Posts: 307
Reputation: 15,141

Post » Fri Jan 22, 2016 6:08 pm

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.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,317
Reputation: 4,628

Post » Fri Jan 22, 2016 8:39 pm

I am so sorry to hear about your car! You weren't hurt, were you?
B
42
S
26
G
22
Posts: 307
Reputation: 15,141

Post » Fri Jan 22, 2016 9:36 pm

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.
B
55
S
28
G
18
Posts: 1,520
Reputation: 25,305

Next

Return to How do I....?

Who is online

Users browsing this forum: newt, thatserafimkid and 3 guests