walking animation question?

For questions about using Classic.

Post » Tue Aug 11, 2009 11:28 pm

hi, i got my character going from left to right and back across the stage, my trouble is that he is a single frame when i move wheras he does the running animation when he is still.
B
1
G
3
Posts: 8
Reputation: 841

Post » Tue Aug 11, 2009 11:44 pm

Well do you use events to set your animations or do you use tagged animations?
Maybe you just tagged the animations wrong or swapped an action unintentionally.

I'm afraid it's impossible to tell for sure what's happening with the information you provided. It would be nice to see your cap file or if you got more into detail about the problem at least.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Wed Aug 12, 2009 1:31 pm

thnx, Is there really a way to upload .cap to the forum?

my character has the "platform behaviour". and is tagged "walking" when I did + the event sheet as condition "is walking" it didnt work.

however when I only did the event sheet. It was good- the character did the running animation as he ran. however it didnt stop when he stood. my animation is 1 obeject with 3 frames

frame 1-standing
frame2-running
frame 2-running

is this right?

also the checked auto-mirror and he's not running the other way; and i did do mirrored sprites in the animator box in the (left)/(right)
B
1
G
3
Posts: 8
Reputation: 841

Post » Wed Aug 12, 2009 2:12 pm

[quote:3vzyrd37]however when I only did the event sheet. It was good- the character did the running animation as he ran. however it didnt stop when he stood. my animation is 1 obeject with 3 frames

frame 1-standing
frame2-running
frame 2-running

is this right?[/quote:3vzyrd37]

Okay you have me a little confused here. It should probably look something like this in your animator bar:



So you actually have different animations for your sprite, each with their own frames of course. I named them like they would be tagged too.

[quote:3vzyrd37]
also the checked auto-mirror and he's not running the other way; and i did do mirrored sprites in the animator box in the (left)/(right)[/quote:3vzyrd37]

When you check the auto-mirror attribute, you actually don't have to add an additional direction to your animation. That's what it's for, it will be automatically mirrored.
However, the animation angles are linked to the object angle (although you can disable that), but the Platfrom behaviour uses its own angle, Sprite[Platform].MovAngle. So if you activate auto-mirror, it won't mirror the sprite in this case automatically, since the object angle doesn't really change, just the MovAngle does.

So you have to change the object angle manually with events. You could use the VectorX(+/-) of the platform movement for this or the key input by the player. Depends if you want your sprite always to face the direction it's moving or allow the player to change it anytime.

I hope this is helping you. And yes you can upload a small cap in the uploads section of the forum (just attach it when you post). If you're still having trouble with this, I can cook up a little example for you.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Sat Aug 15, 2009 1:58 am

thanks

k by key imput do you mean "controls under properties"? if so, from there im not getting how to mirror his walking.

and where do i find Vector X?

here's my .cap
viewtopic.php?f=16&t=4455&p=35667#p35667
B
1
G
3
Posts: 8
Reputation: 841

Post » Sat Aug 15, 2009 3:15 am

By key input, I think something like a MouseKeyboard condition, "Control is down?" is meant.
MouseKeyboard, "Control is down?", and the control "Move Left" or "Move Right", like:
MouseKeyboard: Player 1 Control "Move Left" is down -> PlayerSprite: Set angle to 180
MouseKeyboard: Player 1 Control "Move Right" is down -> PlayerSprite: Set angle to 0


For finding the object's speed, if you want to do it that way instead, what you can do is add a new event/condition, and..
System object, (values section) Compare. Value one: Sprite[Platform].VectorX ..Less than.. Value two: 0
In the condition editor for the comparison, you can click in one of the text fields, then double click on your player-controlled object, then go to the Platform tab, and choose "Get x component of motion" and it will add "Sprite[Platform].VectorX" to the value box for you.

For X, less than 0 is moving left. Greater than 0 is moving right. 0 is stopped.
B
3
S
1
G
3
Posts: 82
Reputation: 1,189

Post » Sat Aug 15, 2009 7:39 am

I think AshyRaccoon did already clarify a lot of things.

But since you went through the trouble of uploading your cap, I messed with it a little and made some changes.

Balloon 2

When you look at the event sheet, you will realize there are different groups. The VectorX group and the key input group (plus the Animations group). You can disable/activate the groups to see how they work, yet for this simple example there's no real difference between the two methods.

I also set the animations with events and commented it a little. I added the according events for Jumping/Falling as well, but remember since there is no real jumping or falling animation I just reused the stopped animation there. You will have to import your proper animations.

Also, I believe I didn't mention it yet, but for your purposes there's always the Platform school tutorial by deadeye. You should definitely check it out.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests