[r95-r101]onLanded not working when solid stacked?

0 favourites
  • 8 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • I simplify the problem in a capx

    dl.dropbox.com/u/48828497/onLandTest.capx

    Based on the event logic the blue box at right hand side is expected to be destroyed when red box onlanded and overlapping with blue box but it is not...

    Tested in r95 and r101 still the same problem

    I adjusted the gravity and max fall speed of red box, the logic sometime works but sometime not.

    Is this a bug? Or i am using wrong method?

    Addon:In game mode, I keep pressing F5, sometime abnormal behavior happen, both red box blew away..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, the logic appears to work approximately 25% of the time, and appears to be related to the fact that there is another red box directly on top of the right side box.

    If you remove the box on top of the right side redbox, everything works properly. If you add a box directly on top of the left-side box, neither works (outside of the approx. 25% [seemingly random success rate]. Finally, if you place a redbox above, instead of on top of, both of the lower red boxes, everything works as it should.

    Just expanding upon the findings, so far as I can tell it is indeed a bug (using r95).

    Also, why do the redboxes, upon destroying the blue boxes, move to the right? This may be another bug, perhaps.

  • You should not add the 'Solid' behavior to objects with the 'Platform' behavior. They are not designed to work together and this probably causes the problem. If you remove the solid behavior from the platform objects, it seems to work OK.

  • Also, if you really need to use the solid behavior, pin it to the player.

    You can see it in live and working, plus, download the CAPX, just clicking on my signature.

  • You should not add the 'Solid' behavior to objects with the 'Platform' behavior. They are not designed to work together and this probably causes the problem. If you remove the solid behavior from the platform objects, it seems to work OK.

    I am stuck here without using solid and platform behavior

    The reason i use platform and solid because conditions i wanted are:

    -blue box destroyed only when red box fall on it

    -red box may stand above blue box in starting of layout

  • Also, if you really need to use the solid behavior, pin it to the player.

    You can see it in live and working, plus, download the CAPX, just clicking on my signature.

    I want the red box able to stand on blue box in starting of layout

    In game play, when red box falling and landed on blue box, blue box destroyed.

    blue box and red box must have gravity and solid

    I am stuck if not using platform and solid behavior together

  • You can work around it by using 'is overlapping at offset', or in fact I would recommend using the Physics behavior instead - the platform behavior is designed for player control, not for falling blocks like this.

  • Thanks Ashley! Is works like a charm!

    I removed solid and platform then add physic and overlap at offset and is works!

    This thread can be closed :)

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