Overlapping and falling Object ...

Get help using Construct 2

Post » Tue Jul 09, 2013 2:19 am

Hello out there !

I'm pretty new to Construct 2 at all, i want to create a little game, but im absolutely out of ideas when it comes to my problem:

A sprite should move down, aslong as it doesnt overlap another sprite, i add some screenshots :

This does work perfectly for me :



This does not :( :



May anyone tell me why ? And how i fix this ?

Thank you :)
B
3
Posts: 6
Reputation: 212

Post » Tue Jul 09, 2013 3:32 am

This is actually tough, because you are checking if the sprite is overlapping its own type, which is always true, since it overlaps itself!

It would be best to keep your falling sprite separate, even it the image is duplicated (you can Clone a sprite). Otherwise, here's a sample of the logic needed.

OverlapFalling.capx

You still need an invisible clone sprite to do the detection, and you need to keep track of the master, so you can exclude it from the overlap detection.

This is using r137, as it have better picking options.
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Thu Jul 11, 2013 7:12 pm

damn, separating would result in ~ 2000 new conditions :s

B
3
Posts: 6
Reputation: 212

Post » Thu Jul 11, 2013 7:25 pm

You're doing something wrong if you need that many conditions. I think we need to see the bigger picture. Are you comfortable posting what you've got so far? Families may also help here.
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227

Post » Thu Jul 11, 2013 9:11 pm

Well, i got what i posted on the first post, but i placed "Sprite9" 7 times in my layout, furthermore, i got 3 other objects that should act in the same way, falling, if theres nothing in below.

any of the placed objects should be able to fall :/
B
3
Posts: 6
Reputation: 212

Post » Fri Jul 12, 2013 7:09 pm

So nobody got an idea that could help me ? :s
B
3
Posts: 6
Reputation: 212

Post » Fri Jul 12, 2013 7:17 pm

Use families. Put Sprite9 in the family, then compare collisions between sprite9 and the family.
Image
B
242
S
29
G
13
Posts: 1,787
Reputation: 18,685

Post » Fri Jul 12, 2013 7:47 pm

Atm i still have the free version, but wouldnt include the family sprite 9 aswell and therefore return 'true' everytime ?
B
3
Posts: 6
Reputation: 212


Return to How do I....?

Who is online

Users browsing this forum: Held, mikehive, Ninjadoodle, NN81 and 11 guests