Overlapping and falling Object ...

0 favourites
  • 8 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • 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 :

    <img src="http://i.epvpimg.com/ooW1c.png" border="0" />

    This does not :( :

    <img src="http://i.epvpimg.com/smGSc.png" border="0" />

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

    Thank you :)

  • 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.

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

  • 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.

  • 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 :/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So nobody got an idea that could help me ? :s

  • Use families. Put Sprite9 in the family, then compare collisions between sprite9 and the family.

  • Atm i still have the free version, but wouldnt include the family sprite 9 aswell and therefore return 'true' everytime ?

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