Bullet Angle Of Motion

Get help using Construct 2

Post » Thu May 23, 2013 10:50 pm

I am trying to setup enemy bullets angle of motion towards my Player. How can I do this?
B
6
Posts: 15
Reputation: 331

Post » Thu May 23, 2013 11:33 pm

@cmilian you can use the turret behavior with your enemy. set the player as a target. Is it a top down game? if it is I think that would work fine. If it is not, you can still you turret behavior, make a sprite, set turret behavior and set it to the position of the enemy. set it to be invisible (so you don't see it rotate). haven't tested it but i imagine it would work.Kcpunk6662013-05-23 23:40:36
B
20
S
3
G
1
Posts: 46
Reputation: 1,486

Post » Fri May 24, 2013 1:25 am

I tried torrent, but didn't find the setting for target. Any doc that shows the form?
B
6
Posts: 15
Reputation: 331

Post » Fri May 24, 2013 2:31 am

This should be able to help :-) .. I just learned this today!

Turret Demo
Turret Demo Code (capx)


Tutorial on Turrets

Turret Manule
B
6
Posts: 35
Reputation: 370

Post » Fri May 24, 2013 2:33 am

You could just set the angle of motion to "angle(bullet.x,bullet.y,player.x,player.y)".
B
44
S
13
G
7
Posts: 338
Reputation: 10,389

Post » Fri May 24, 2013 2:46 am

Perfect, will try it!
B
6
Posts: 15
Reputation: 331

Post » Fri May 24, 2013 2:58 am

You could also "set angle towards position" set X to player.x and y to player.y
B
6
Posts: 35
Reputation: 370

Post » Fri Jul 12, 2013 3:10 pm

@zatyka,

Thanks,I have spend two day after I got your post and resolved my issues so thanksrob2013-07-12 15:11:05
B
12
S
2
G
3
Posts: 57
Reputation: 3,439


Return to How do I....?

Who is online

Users browsing this forum: Callan S, farfetchd83 and 16 guests