Collision bug or am i doing something stupid?

Post your own tutorials, guides and demos.

Post » Tue Sep 14, 2010 6:08 pm

I'm getting a fatal crash from a seemingly simple collision event. It happened both on construct v. 0.99.92 and 0.99.94

The app crashes, seemingly at random, when a cannonball sprite hits and destroys the wall tiles. If you download and try this, you may have to restart the app a few times if nothing happens.

please help!
B
5
S
1
G
3
Posts: 24
Reputation: 1,123

Post » Tue Sep 14, 2010 7:12 pm

Here are two different ways to avoid the crash.

First way:
Change event 1 from "Always" to "Start of layout".
On event 2 change the order of actions so that destroy is after spawn.
Disable/Remove event 3.

Second way:
Add "Sprite6" to the family "Red".
Change event 4 to the following:
[code:1sii29ky]+ System: For each Sprite6
+ Sprite6: [negated] Sprite6: overlaps Red : offset (0,-2)
+ Sprite6: [negated] Sprite6: overlaps Sprite2 : offset (0,-2)
-> Sprite6: Destroy
[/code:1sii29ky]
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Tue Sep 14, 2010 8:30 pm

thanks a lot! i used the second way and it worked :) .. i think i understand what i missed.
B
5
S
1
G
3
Posts: 24
Reputation: 1,123


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest