Fire after Rotation Complete

0 favourites
  • 3 posts
From the Asset Store
110 High-Quality magic sounds of Air, Fire, Earth, Water and also Ice
  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey Crush,

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

    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."

  • Yeah, I was looking at the turret behavior, and I think it might do what I want, so I'll look into that. Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)