SirAwesomeface's Recent Forum Activity

  • Sorry I don't know if the link worked in the last post. Let's try agian. Here ppl.ug/gZdoYdSJfxc

    EDIT:

    Nevermind, ignore that. I can't post links yet, apparently. You'll just have to copy/paste ;)

  • Yes, I've actually made some progress since yesterday thanks to BluePhaze's tips. I don't think I used the best method, but I actually got it working and not with TOO many events.

    Keep in mind I'm using Construct Classic, not Construct2, so my angles and stuff may be different than yours. But basically what I did was make sure the angle is being checked whenever the turret is moving, or not moving, and then I assigned animations to every possible angle. Here's how:

    Turret - Is moving

        Turret: Angle >= 61

        Turret: Angle <= 119     Turret: Set animation to "Down"

        Turret: Angle >= 120

        Turret: Angle <= 150     Turret: Set animation to "DownLeft"

        Turret: Angle >= 151

        Turret: Angle <= 209     Turret: Set animation to "Left"

    And so forth until I'd covered all possible angles. Then I repeated for when the turret's not moving, and it seems to be working ok so far.

    This is the link to what I've got: ppl.ug/gZdoYdSJfxc The turret is the player, you control it with up, down, left, and right. Press "e" to make it acquire target and fire. It should automatically rotate, with animations, towards the "enemies" (red x's).

    But now I'm wondering if I can get some more help. As you can see from my example, I want the player to control the turret. And I want it to aim at enemies and fire, using the animations which I've provided, which seems to be working. However, I want the turret to stay angled towards the target, even when the player is moving the turret. For example, in top down shooters where you control where the player points using the mouse, but he can move freely without aiming all over the place. I want to accomplish that, but with the turret automatically finding targets and keeping aimed at them while the player moves. Any ideas?

  • Thanks a bunch for the comments, I appreciate it. You may have pointed me in the right direction, I'll mess around a bit and see what I can manage.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Although I've read all the material suggested here, I'm also having trouble animating turrets. Like jbarker281, I have been unable to find answers.

    Specifically, I want my object with the turret behavior to animate differently depending on what angle it's at. For example, when my turret rotates towards its target, instead of simply rotating the sprite towards the target, I want it to play animations I have set up when it rotates to specific degree angles. Is this possible?

SirAwesomeface's avatar

SirAwesomeface

Member since 25 Apr, 2013

None one is following SirAwesomeface yet!

Trophy Case

  • 11-Year Club

Progress

11/44
How to earn trophies