Physics - destroy when item crashes to a stop

Get help using Construct 2

Post » Thu Jan 09, 2014 10:53 pm

I have an item that I want to destroy when it crashes to the ground. It however must not die on contact with the object that is between it and the ground. Because of this I can not use collisions. I have unsuccessfully tried the following:
Given the object a Boolean variable called "Falling" and set this to false.

In the event sheet I then do the following:
Test If the velocity of the item is > 1 then set "Falling" to true.
Test if falling and velocity is = 0 then destroy object.

I have tried this on the sprite in the "Template-PhysicsCatapult" but it doesn't work
B
4
S
1
G
2
Posts: 42
Reputation: 961

Post » Fri Jan 10, 2014 2:53 am

You could test for the items Y position. If item1.Y is greater than or less than item2.Y or test if the two items are overlapping each other.
B
6
S
2
Posts: 151
Reputation: 1,366

Post » Sat Jan 11, 2014 12:26 am

Just make a "On collision with object" : "Destroy" code, and enter the ground object. You cannot have the same object for the ground and the other object, but you can copy the one you have and rename it ground.
B
5
S
1
Posts: 15
Reputation: 460


Return to How do I....?

Who is online

Users browsing this forum: adventurist, Blendi1223 and 26 guests