How do I set bullet angle toward sprite's image point

Get help using Construct 2

Post » Sat Aug 06, 2016 8:36 am

I'm well aware of the expression 'angle(bulletname.X, bulletname.Y, target.X, target.Y)', that's what I'm using.

Let's say I want to set the angle of the bullet towards a giant bunny. The expression would be: 'angle(bulletname.X, bulletname.Y, giantbunny.X, giantbunny.Y)

The angle of the bullet would face towards the giant bunny, as it should. But what if I want to set the bullet's angle towards a specific part of the bunny, for example, a specific image point?

Please don't comment additional ways to go about this, I only want to know if there's a way to target an image point using that expression. Thanks in advance! :)
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Sat Aug 06, 2016 9:13 am

Try angle(bulletname.X, bulletname.Y, giantbunny.ImagePointX(n), giantbunny.ImagePointY(n))
n is the number of the imagepoint you want to aim for.
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Sat Aug 06, 2016 9:46 am

Thanks a lot! That's exactly what I wanted. I appreciate it :)
B
24
S
10
G
1
Posts: 153
Reputation: 2,660


Return to How do I....?

Who is online

Users browsing this forum: amazingdream, Yahoo [Bot] and 18 guests