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

Bugs will be moved here once resolved.

Post » Tue Sep 04, 2012 1:51 pm

I simplify the problem in a capx
https://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..
winsontan5202012-09-04 13:56:04
B
6
S
2
G
3
Posts: 4
Reputation: 2,664

Post » Tue Sep 04, 2012 10:49 pm

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.
B
28
S
6
G
5
Posts: 248
Reputation: 5,463

Post » Wed Sep 05, 2012 3:26 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Sep 05, 2012 4:57 pm

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.
ImageImageImageImageImageImage
B
93
S
19
G
12
Posts: 1,192
Reputation: 18,301

Post » Thu Sep 06, 2012 6:25 am

[QUOTE=Ashley] 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.[/QUOTE]
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

B
6
S
2
G
3
Posts: 4
Reputation: 2,664

Post » Thu Sep 06, 2012 6:32 am

[QUOTE=TELLES0808] 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.[/QUOTE]

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
B
6
S
2
G
3
Posts: 4
Reputation: 2,664

Post » Thu Sep 06, 2012 12:51 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Thu Sep 06, 2012 1:44 pm

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 :)
B
6
S
2
G
3
Posts: 4
Reputation: 2,664


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests