How do I control bullet angles

Get help using Construct 2

Post » Mon May 18, 2015 7:28 pm

So I have a triangle spinning and from each of it's corners it shoots a bullet and I want them to shot out of the corners at the same angle that the corners are pointing, how can I do that?
B
22
S
8
Posts: 203
Reputation: 2,059

Post » Mon May 18, 2015 7:47 pm

The triangle is rotating, so I'm assuming the originpoint is in the center..
Place imagepoints at the corners..

for imagepoint 1:

on bullet created - set angle = angle(triangle.x,triangle.y,triangle.imagepointx(1),triangle.imagepointY(1))

etcetera..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon May 18, 2015 8:07 pm

or....you can always add more image points :)

capx> http://s000.tinyupload.com/index.php?fi ... 1871567470

but they are not necessary :D

capx> http://s000.tinyupload.com/index.php?fi ... 6135716421
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Mon May 18, 2015 10:10 pm

I do have image points set at each point in the triangle but the only go in 2 directions instead of making a spray all around coming from the points of the triangle
B
22
S
8
Posts: 203
Reputation: 2,059

Post » Mon May 18, 2015 10:21 pm

..if you want something like this

Image

Download this capx http://s000.tinyupload.com/index.php?fi ... 6135716421
and see how it was done
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Mon May 18, 2015 10:29 pm

Also is there anyway I could make this triangle move around the player once it spawns in while it spins? and yes that's exactly what I want, thank you
B
22
S
8
Posts: 203
Reputation: 2,059


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests