Fire after Rotation Complete

Get help using Construct 2

Post » Fri May 03, 2013 3:53 am

Hello Everyone,

I have a simple turret, and using touch. I have the turret rotate toward the touch point. I want to have the turret fire once it reaches the angle where the touch is... How do I determine when my sprite has reached the angle of the touch?

I can easily tell the turret to turn while the touch is going. I just can't figure out how to do the comparison...

Thanks,
Dower
B
8
S
1
G
2
Posts: 11
Reputation: 1,606

Post » Fri May 03, 2013 6:35 am

Hey Crush,

If you are using the turret behaviour. Have you tried using "predictive aim" aswell?

https://www.scirra.com/manual/152/turret

There are other ways. I haven't used turret behaviour myself but if you are a beginner then this is probably the easiest way.

In fact it looks like the behaviour might already do what you want without predictive;

From the manual: "On target acquired is triggered, and if Rotate is set to Yes the object will start rotating towards the target. Once the turret is pointing in the direction of the target, On shoot will trigger at the frequency determined by the Rate of fire property."
GenkiGenga2013-05-03 06:40:27
ImageImage
B
73
S
16
G
6
Posts: 1,038
Reputation: 10,473

Post » Sun May 05, 2013 2:27 am

Yeah, I was looking at the turret behavior, and I think it might do what I want, so I'll look into that. Thanks!
B
8
S
1
G
2
Posts: 11
Reputation: 1,606


Return to How do I....?

Who is online

Users browsing this forum: benajad, Braus, R0J0hound, shinkan and 18 guests