annoying container picking

Post your own tutorials, guides and demos.

Post » Wed Aug 20, 2008 12:03 am

[quote="Ashley":3gbhkvt5]More flexibility with collision conditions is a common request, so I've added two new conditions for the System object in the next build[/quote:3gbhkvt5]

:shock:

Wow, that sounds awesome
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Aug 20, 2008 1:53 pm

thank you so much this is brilliant, I feel like crying with happiness

I'll donate on next patch when I can actually use it 8) (even more than 10 if you add find/filtering lol)
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Sun Aug 31, 2008 7:20 pm

ok so new build is out and it has advanced collisions...
but I still can't make this work :(
adding other conditions seems to completely break it still :cry:

I have been trying for a while with no luck and a lot of confusion, and I don't know if it is working as intended as it is just picking both objects in one of the containers, and never the other container... :?

Please help!!
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Sun Aug 31, 2008 8:39 pm

Ah, there was actually a bug in the On Advanced Overlap code! That's why it wasn't working as expected at first... the fix will be in the next build, which will be 0.97.2, which won't be as long as the last build hopefully.

Now your event, if you leave as-is, will always pick A, which picks the B in its container as well. That's going to make any events referring to B refer to the B in the same container as A.

You can work around this by splitting up your event. With my fix applied ( :oops: ) the following works successfully as I think you want: the overlapping A/B objects rotate.

+ A (pick) and B (don't pick) overlap
-> A: rotate 10 degrees

+ A (don't pick) and B (pick) overlap
-> B: rotate 10 degrees

If you do it in one event, B refers to the one in the container as the picked A. By using separate events, you can pluck out just the one instance that is overlapping and get around the containers that way. That should satisfy your needs... I hope!
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Sun Aug 31, 2008 8:44 pm

Oh, and I can send you an updated runtime if you're desperate to try this out.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Sun Aug 31, 2008 9:02 pm

heh alright, glad I discovered a bug there then!

Will it work with only when A's value is 1 and B's is 0? because this is important.
I just had them both in the same event to show which of both it was picking, as I can't sort it out with the values aswell.

It's like I need to pick then both in the same event, or at different times in the event...
it needs to pick the collided ones, then make sure they both have the correct values, I managed it with one value, but not with both.

something like:
+ B.value('m')=0
+ A (pick) and B (don't pick) overlap
+ A.value('n')=1
-> A: rotate 10 degrees

+ A.value('n')=1
+ A (don't pick) and B (pick) overlap
+ B.value('m')=0
-> B: rotate 10 degrees

so out of the B's with m=0, if one collides with an A, it will unpick all the B's, pick matching A's, then pick the A's out of these with n=1 (and vice versa)
The problem with that is, you put in B.value('m')=0 first, and then it picks the A's in it's container, so it will only count the collision with the A's in it's container, which I don't want it to count! If you put B.value('m')=0 after, there are no B's picked at all at that point, so it's useless. :?

Maybe it's possible with the function object forgetting picking or something???? (I have no idea lol)

[quote="Ashley":21iuun4a]Oh, and I can send you an updated runtime if you're desperate to try this out.[/quote:21iuun4a]
would be nice :D
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Sun Aug 31, 2008 9:53 pm

Well... hopefully this works, give it a try and let me know if it does what you want.

http://www.scirra.com/files/pre0972runtimes.zip

Extract to Data directory.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Sun Aug 31, 2008 10:44 pm

brilliant, with that fix I managed to make it work:

EDIT: hmm looks like paypal doesnt like my card :? I guess I'll try again tomorrow :oops:
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Previous

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest