Turret Sprite Sheet

Get help using Construct 2

Post » Wed Apr 03, 2013 8:52 pm

Hello,

I'm working with the template turret game and would like to spruce up the graphics. I have a couple of turret sprite sheets but do not know how to properly set it up so that it animates correctly. Can anyone point me in the right direction?

Thanks in advance for any help.
B
8
S
1
Posts: 38
Reputation: 1,183

Post » Wed Apr 03, 2013 9:20 pm

First and foremost you should read the manual entry for the animation editor. Here it is.
B
47
S
17
G
18
Posts: 847
Reputation: 13,827

Post » Wed Apr 03, 2013 9:59 pm

Go through the basic tutorials as they cover animations.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Post » Wed Apr 03, 2013 10:17 pm

Thanks for the replies. I understand setting up animations and spritesheets - just not incorporating animations with the turret behavior. I'll keep digging. Thanks again.
B
8
S
1
Posts: 38
Reputation: 1,183

Post » Thu Apr 25, 2013 4:44 pm

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?
B
2
Posts: 4
Reputation: 158

Post » Thu Apr 25, 2013 4:54 pm

Check the current angle and then set your animation frame based on it
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Post » Thu Apr 25, 2013 4:58 pm

The issue with using animation as opposed to rotation on turrets is that the sprite editor considers the right hand edge to be the "front" of the sprite. Best would be to use rotation but have animation frames for your effects while it rotates.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,428

Post » Fri Apr 26, 2013 1:03 am

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.
B
2
Posts: 4
Reputation: 158

Post » Fri Apr 26, 2013 4:43 am

Hey, do you have any luck with this??
I am also trying to figure out how to correctly set up this, but it seems that it will require a LOT of events to handle all the animations required for the rotation.
B
7
S
1
Posts: 17
Reputation: 585

Post » Fri Apr 26, 2013 3:00 pm

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: http://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?SirAwesomeface2013-04-26 15:07:31
B
2
Posts: 4
Reputation: 158

Next

Return to How do I....?

Who is online

Users browsing this forum: ETgirl79 and 12 guests