Platformer Animation Issues

This forum is currently in read-only mode.
From the Asset Store
Carousel Animation, make carousel of you image gallery or anything
  • I'm a Construct noob, trying desperately to piece together my first game ever, a fairly simple platformer. I keep running into issues and problems every step of the way, and was trying not to post too many simple problems on this forum for fear of looking like an idiot. Well, that time has passed -- I'm totally stuck, and if I don't get some outside assistance I'm afraid my project is going to die entirely. I've gone through the forum archives, I've followed every tutorial, and still can't seem to get anything to work quite right. So I'm collecting all my questions and issues in this thread, and if there's anybody out there who can help me that'd be awesome.

    1. I can't seem to get my transitional animations to work right. Basic animations, like running and jumping, are working fine. But I'm trying to do things like a small "screech to a halt" animation (ala Super Mario World) when the player changes running direction while going top speed.

    My idea was to create an event that checked to see if the player's X velocity was positive or negative, and triggered when they pressed the button to run in the opposite direction. But I couldn't figure out how to check velocity, and some searching in the forums leads me to believe that you can only check velocity on an object with the Physics behavior. Is this correct? Can I add the Physics behavior to an object that already has the Platform behavior without it messing things up? Or is there an easier way to do this that's eluding me?

    2. Even if I solved the Velocity issue, I still can't figure out how to make animations act properly. My main character has a 2-frame jump animation, and it's supposed to play the 2 frames and then hold on frame 2 until the character's state changes to "falling". But it acts weird -- sometimes it plays the 2 frames very quickly (which is what it's supposed to do) and other times it holds on frame 1 as long as you hold down the jump button.

    3. I tried making an idle animation by having the basic "standing still" pose be the first frame, which lasts 3 seconds, and then having the idle animation play after that. It worked fine, except for the fact that it would start the animation at random intervals, like you'd land from a jump and it would start halfway through the idle animation. How do I get it to start with the 3-second frame 1 every time?

    I created events that set a variable to "1" whenever a non-idle animation played, and then an event that ran whenever Idle animation played. If that variable was 1, it would set frame # to 1 and set the variable back to 0. It seemed like that should do the trick but it doesn't make anything act any differently.

    Is there an easier way to achieve this? I thought the Wait command might be the key, but couldn't figure out how to get it to work.

    4. I wanted a "landing" animation to play whenever the player landed a jump, where the character crouched for a frame or two before standing back up. How do you get something like this to work? My event that was supposed to trigger that animation on contact between the player and the ground didn't do anything.

    Thanks to anybody who took the time to read and/or reply to this. I don't know how to post a .cap, or I would. If somebody can tell me how to do it I'll gladly post mine. Any and all help anyone could offer would be much appreciated.

  • Oh, and I was following Platform School when I created the groundwork of my game, and therefore I have the player controlling a red box, with the actual character's animations a separate object set to overlap the red box. I now see from searching the forums that this can cause issues of its own? Could this be the root of any of my problems?

    And it probably goes without saying, but having one of your most thorough, helpful tutorials teach people to do things the wrong way isn't great. Is there any chance Platform School will be updated at any point?

  • My idea was to create an event that checked to see if the player's X velocity was positive or negative, and triggered when they pressed the button to run in the opposite direction. But I couldn't figure out how to check velocity, and some searching in the forums leads me to believe that you can only check velocity on an object with the Physics behavior.

    You can get the X vector for the platform behavior, it's called 'Get X component of motion' and the expression looks like this: Sprite[Platform].VectorX

    2. Even if I solved the Velocity issue, I still can't figure out how to make animations act properly. My main character has a 2-frame jump animation, and it's supposed to play the 2 frames and then hold on frame 2 until the character's state changes to "falling". But it acts weird -- sometimes it plays the 2 frames very quickly (which is what it's supposed to do) and other times it holds on frame 1 as long as you hold down the jump button.

    I admit it can be a little fight to get Construct to play your animations correctly, sometimes you'll have to set the animation to the first frame manually and use the 'Play animation' action after that.

    Other than that a cap file would really help pinpointing your problem.

    3. I tried making an idle animation by having the basic "standing still" pose be the first frame, which lasts 3 seconds, and then having the idle animation play after that. It worked fine, except for the fact that it would start the animation at random intervals, like you'd land from a jump and it would start halfway through the idle animation. How do I get it to start with the 3-second frame 1 every time?

    I created events that set a variable to "1" whenever a non-idle animation played, and then an event that ran whenever Idle animation played. If that variable was 1, it would set frame # to 1 and set the variable back to 0. It seemed like that should do the trick but it doesn't make anything act any differently.

    Is there an easier way to achieve this? I thought the Wait command might be the key, but couldn't figure out how to get it to work.

    Again, without a cap, I can't exactly tell what you did eventwise, although you provided a description. I'd suggest to check if the player was moving at all, then add to a value, if that value reaches a set max, you'll play the idle animation. In case the player moves again, you set the value to 0.

    4. I wanted a "landing" animation to play whenever the player landed a jump, where the character crouched for a frame or two before standing back up. How do you get something like this to work? My event that was supposed to trigger that animation on contact between the player and the ground didn't do anything.

    What conditions did you use for this event? An 'Is on ground' combined with a 'Trigger once while true' condition should do the trick.

    Thanks to anybody who took the time to read and/or reply to this. I don't know how to post a .cap, or I would. If somebody can tell me how to do it I'll gladly post mine. Any and all help anyone could offer would be much appreciated.

    Well, as i mentioned, I'd really appreciate if you posted a cap so you can be helped properly. Try checking out services like Dropbox and/or Box.net, which are popular around here, and for good reason so. Works great!

    And it probably goes without saying, but having one of your most thorough, helpful tutorials teach people to do things the wrong way isn't great. Is there any chance Platform School will be updated at any point?

    It doesn't seem you read the last post deadeye made in the tutorial thread. It's also locked now for good reason. Since a lot information is out of date. He's still working on an all new version though.

  • Hey, thanks for all your assistance, it's really appreciated. Here's the Cap. Some of the issues I mentioned (like the "landing from a jump" animation) aren't present here, because I got frustrated with my attempts not working, and just deleted those events. Still, you'll see the animations I'm talking about.

    http://dl.dropbox.com/u/19118923/SuitMan.cap

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I teach people to do things wrong on purpose. It's all an elaborate hoax, the sole purpose of which is to feed on the tears of unsuspecting newcomers. I want all my garmonbozia.

    Anyway, no there's nothing really wrong with making a platformer control object out of a separate sprite. In fact, at the time I started those tutorials it was pretty much the only way you could do it. Now that you can make a custom collision mask for your sprite you don't need to though.

  • Don't get me wrong, Platform School has helped me in countless ways. It was just that I read a whole thread that basically boiled down to "Don't do things that way anymore, it'll screw everything up". Since I was already having all kinds of problems, it was frustrating to think that following the FAQ-recommended tutorial was what had caused the issues. That said, I have no way of knowing if the author of that other thread knew what he was talking about.

    And at any rate, Platform School solved a lot more of my Construct problems than it ever caused. Without it, I'd still be stuck trying to figure out how to make platforms work, so thanks

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