Check angle of collision between solid and bullet

Get help using Construct 2

Post » Sun Sep 08, 2013 10:27 pm

I have a solid (window) which breaks when the player fires a bullet at it. There are 3 different breaking animations and I would like to run one of these based on whether the player fires at the window from roughly head on or either from a left or right angle.

It's a mouse aim/top down shooter and the windows are placed in the layout both horizontally and vertically, so not sure how to go about checking the angle of collision between the bullet and the windows to trigger the correct animation.
B
5
S
1
Posts: 44
Reputation: 665

Post » Mon Sep 09, 2013 12:59 am

You should be able to do this by setting a variable to the bullet angle right before you destroy it.

Something like Bullet on collision with Window, set Variable to Bullet.angle and then destroy bullet.

Then check if the bullet is between set ranges to show specific animations. GenkiGenga2013-09-09 01:00:09
ImageImage
B
123
S
23
G
7
Posts: 1,071
Reputation: 13,091

Post » Wed Sep 11, 2013 11:21 pm

That works well, thanks.
B
5
S
1
Posts: 44
Reputation: 665

Post » Wed Oct 02, 2013 8:36 am

Hi, i'm new and don't know where to ask this. But i really need help.
Ok i just straight to the point.
I have two objects, when i click the mouse object #1 then spawning(shooting) bullet object to object #2 and it will destroy when it hit it. but my problem is, because i decreased the bullet speed, when the object #1 shooting bullets, and i keep clicking,then more bullets on screen, the first bullet destroyed nicely when hit,but the next bullets following the first one also destroyed before they reach the target.
Hope any of you understand w/ i'm saying. :D i'll appreciate any help.
B
4
Posts: 10
Reputation: 220


Return to How do I....?

Who is online

Users browsing this forum: beohs, oosyrag, tunepunk and 13 guests