Fall Damage

Get help using Construct 2

Post » Fri Oct 26, 2012 3:02 pm

Hi, i've searched for this question in the forums and i didn't found anything.

I'm starting with construct2, so sorry if it's a stupid question and if my english is bad.

I have multiple barrels in my scene, and i want to explode them when falling into the ground at some speed.
I've tried comparing two values and destroying the barrels if "Barrel.Physics.Y" speed is greater or equal than 100 and if the barrel collides the ground.
But i dont know why it only works with one of my barrels in the scene instead of working in all of them.

So, can anyone help?
Thanks.
B
7
S
1
Posts: 14
Reputation: 1,178

Post » Fri Oct 26, 2012 5:05 pm

Could you post a capx or a screenshot of the relevant events?TL222012-10-26 17:06:04
B
58
S
20
G
7
Posts: 305
Reputation: 8,804

Post » Sat Oct 27, 2012 1:48 am

Make sure "Barrel on collision with Ground"
is the first condition in the event

so it goes

+Barrel on collision with Ground
and
+Barrel.physics.velocityY > A
     -> explode!

If that doesn't work, add "For each Barrel" at the top, and have the above as a sub event.
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Sat Oct 27, 2012 12:53 pm

Have a look at this, and see if it may be helpful. If not I blame a late night

https://dl.dropbox.com/u/108799982/Capx%20Demos/Boom.capx
Using R238 for all examples
B
60
S
17
G
6
Posts: 363
Reputation: 9,125

Post » Sat Oct 27, 2012 2:25 pm

Thanks guys! I fixed it
B
7
S
1
Posts: 14
Reputation: 1,178


Return to How do I....?

Who is online

Users browsing this forum: Zebbi and 27 guests