correct angle

For questions about using Classic.

Post » Thu Aug 19, 2010 7:35 pm

hello,

I have a question about the following situation:
- one moving sprite (bullet behaviour) from left to right
- on right side a gun that shoots a bullet (bullet behaviour), aimed at sprite.

But because the sprite is moving, it misses: it shoots at the position the sprite was, at the moment of shooting.

How would I let it aim a little bit lower, so that it hits the sprite?
for example:
Angle: Bullet towards Sprite.bottom minus 8 pixels
B
16
S
5
G
7
Posts: 599
Reputation: 5,000

Post » Thu Aug 19, 2010 7:45 pm

What you want is predictive aiming, part of the turret behavior.

http://sourceforge.net/apps/mediawiki/c ... t_Behavior
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Fri Aug 20, 2010 2:04 am

Other than using the predictive aiming option with the turret behavior, there is also the Linearaim system expression. There is an example of it under New -> New template/example -> Aim AI Tutorial in Construct, as well as a link to an old thread about it in it's description on the wiki.

They both seem to work the same, as far as I can tell.
B
3
S
2
G
2
Posts: 187
Reputation: 1,449

Post » Fri Aug 20, 2010 5:46 am

Thanks for the replies, I will try it.
B
16
S
5
G
7
Posts: 599
Reputation: 5,000


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests