walking animation question?

This forum is currently in read-only mode.
From the Asset Store
4 Block Soldiers with different animations, 400x400
  • 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.

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

  • 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)

  • [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?

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

    <img src="http://i32.tinypic.com/2yw8f9z.png">

    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)

    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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

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

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

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